Class JFile
- java.lang.Object
- 
- com.inductiveautomation.snap.javatree.JNode
- 
- com.inductiveautomation.snap.javatree.JFile
 
 
- 
 public class JFile extends JNode The top level Java part describing a Java file.
- 
- 
Constructor SummaryConstructors Constructor Description JFile()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description JClassDeclgetClassDecl()Returns the JClassDecl for the file.java.util.List<JClassDecl>getClassDecls()Returns the JClassDecls for the file.WebClassLoadergetClassLoader()Returns the class loader used to resolve classes.java.lang.StringgetClassName(JNode aNode, java.lang.String aName)Returns a Class name for given node and name.java.lang.StringgetClassName(java.lang.String aName)Returns a Class name for given name referenced in file.protected java.lang.StringgetClassNameImpl()Returns the type class of this file.JClassRefgetClassRef(java.lang.String aClassName)Returns a class reference for a fully specified class name.protected JClassRefgetClassRefImpl()Returns the class reference for this node.java.lang.ExceptiongetException()Returns the exception if one was hit.java.util.List<JImportDecl>getImports()Returns the import statements.protected java.lang.StringgetNameImpl()Resolves file name from ClassDecl.java.lang.PackagegetPackage()Returns the package.JPackageDeclgetPackageDeclaration()Returns the package declaration.protected java.lang.PackagegetPackageImpl()Returns the package.java.lang.StringgetPackageName()Returns the package name.WebFilegetSourceFile()Returns the WebFile for this JFile.protected voidinit(JFile aJFile)Init from another JFile.voidsetException(java.lang.Exception anException)Sets the exception.voidsetPackageDecl(JPackageDecl aPD)Sets the package declaration.voidsetSourceFile(WebFile aFile)Sets the WebFile for this JFile.- 
Methods inherited from class com.inductiveautomation.snap.javatree.JNodeaddChild, buildChildren, getBlock, getChild, getChildCount, getChildren, getClassName, getClassRef, getEnclosingClassDecl, getEnclosingMemberDecl, getEnclosingMethodDecl, getEnd, getEndToken, getFile, getJClass, getLineIndex, getName, getNodeAtCharIndex, getNodeFields, getNodeFieldsImpl, getNodeParents, getNodePath, getNodeString, getOthers, getParent, getParent, getReferencedClasses, getReferencedClassNames, getReferencedClassNames, getReferencedClassNames, getStart, getStartToken, getString, getVariableDecl, getVariableDeclInside, getVariableDecls, isBlock, setClassName, setClassRef, setEndToken, setJClass, setParent, setStartToken, toString
 
- 
 
- 
- 
- 
Method Detail- 
getSourceFilepublic WebFile getSourceFile() Returns the WebFile for this JFile.
 - 
setSourceFilepublic void setSourceFile(WebFile aFile) Sets the WebFile for this JFile.
 - 
getClassLoaderpublic WebClassLoader getClassLoader() Returns the class loader used to resolve classes.- Overrides:
- getClassLoaderin class- JNode
 
 - 
getPackageDeclarationpublic JPackageDecl getPackageDeclaration() Returns the package declaration.
 - 
setPackageDeclpublic void setPackageDecl(JPackageDecl aPD) Sets the package declaration.
 - 
getNameImplprotected java.lang.String getNameImpl() Resolves file name from ClassDecl.- Overrides:
- getNameImplin class- JNode
 
 - 
getPackageNamepublic java.lang.String getPackageName() Returns the package name.
 - 
getPackagepublic java.lang.Package getPackage() Returns the package.
 - 
getPackageImplprotected java.lang.Package getPackageImpl() Returns the package.
 - 
getImportspublic java.util.List<JImportDecl> getImports() Returns the import statements.
 - 
getClassDeclpublic JClassDecl getClassDecl() Returns the JClassDecl for the file.
 - 
getClassDeclspublic java.util.List<JClassDecl> getClassDecls() Returns the JClassDecls for the file.
 - 
getClassNamepublic java.lang.String getClassName(java.lang.String aName) Returns a Class name for given name referenced in file.
 - 
getClassNamepublic java.lang.String getClassName(JNode aNode, java.lang.String aName) Returns a Class name for given node and name.
 - 
getClassNameImplprotected java.lang.String getClassNameImpl() Returns the type class of this file.- Overrides:
- getClassNameImplin class- JNode
 
 - 
getClassRefImplprotected JClassRef getClassRefImpl() Returns the class reference for this node.- Overrides:
- getClassRefImplin class- JNode
 
 - 
getClassRefpublic JClassRef getClassRef(java.lang.String aClassName) Returns a class reference for a fully specified class name.
 - 
getExceptionpublic java.lang.Exception getException() Returns the exception if one was hit.
 - 
setExceptionpublic void setException(java.lang.Exception anException) Sets the exception.
 - 
initprotected void init(JFile aJFile) Init from another JFile.
 
- 
 
-