| ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Represents a file with source code, or compiled java class.
Method classes returns this file's content as an enumeration of upper-level classes
(inner classes are not included in the enumeration).
Method getContainingPackage returns a containing package for this file.
"C:\agent007\java\myClass.java"
It is returned by the getQualifiedName method.
"myClass.java"
It is returned by the getName method. It can be changed using the setName method.
A new file can be created by SciFactory or
SciGenericFactory objects.
| Method Summary | |
boolean | canSetName(String name)Checks whether the specified string can be set as a name for this file. |
SciClassEnumeration | classes()Returns an enumeration of upper-level classes in this file. |
SciPackage | getContainingPackage()Returns the package this file belongs to. |
SciJavaImportList | getJavaImportList()Returns JavaImportList containing SciJavaImport instances. |
String | getName()Returns a string with the name for this file. |
SciObject | getObjectAtPosition(int offset)Reserved not implemeted yet. |
String | getQualifiedName()Returns the qualified name string for this file. |
void | setName(String name)Sets the name for this file. |
| Methods inherited from interface com.togethersoft.openapi.sci.SciScope |
declaredElements, isDeleted, visitExpressions, visitExpressions, visitReferences, visitReferences, visitStatements, visitStatements |
| Methods inherited from interface com.togethersoft.openapi.sci.SciContainer |
canPaste, objects, paste |
| Methods inherited from interface com.togethersoft.openapi.sci.SciObject |
canCut, canDelete, canReplace, copy, cut, delete, getContainingFile, getContainingScope, getLanguage, getPositions, getText, getUserProperty, isReadOnly, replace, setUserProperty |
| Method Detail |
public boolean canSetName(String name)
true if the specified name can be set for this file, false otherwisepublic SciClassEnumeration classes()
innerClasses method should be used.public SciPackage getContainingPackage()
public SciJavaImportList getJavaImportList()
JavaImportList containing SciJavaImport instances.
JavaImportList containing SciJavaImport instancespublic String getName()
public SciObject getObjectAtPosition(int offset)
public String getQualifiedName()
SciFilees the qualified name is an absolute pathname to this file.public void setName(String name)
SciFile f = SciModelAccess.getModel().getFactory(SciLanguage.JAVA).newFile();
f.setName("R.java"); //setting the name
someSciPackage.paste(f,null,false);
| ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||