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 Details

    • JFile

      public JFile()
  • Method Details

    • getSourceFile

      public WebFile getSourceFile()
      Returns the WebFile for this JFile.
    • setSourceFile

      public void setSourceFile(WebFile aFile)
      Sets the WebFile for this JFile.
    • getClassLoader

      public WebClassLoader getClassLoader()
      Returns the class loader used to resolve classes.
      Overrides:
      getClassLoader in class JNode
    • getPackageDeclaration

      public JPackageDecl getPackageDeclaration()
      Returns the package declaration.
    • setPackageDecl

      public void setPackageDecl(JPackageDecl aPD)
      Sets the package declaration.
    • getNameImpl

      protected String getNameImpl()
      Resolves file name from ClassDecl.
      Overrides:
      getNameImpl in class JNode
    • getPackageName

      public String getPackageName()
      Returns the package name.
    • getPackage

      public Package getPackage()
      Returns the package.
    • getPackageImpl

      protected Package getPackageImpl()
      Returns the package.
    • getImports

      public List<JImportDecl> getImports()
      Returns the import statements.
    • getClassDecl

      public JClassDecl getClassDecl()
      Returns the JClassDecl for the file.
    • getClassDecls

      public List<JClassDecl> getClassDecls()
      Returns the JClassDecls for the file.
    • getClassName

      public String getClassName(String aName)
      Returns a Class name for given name referenced in file.
    • getClassName

      public String getClassName(JNode aNode, String aName)
      Returns a Class name for given node and name.
    • getClassNameImpl

      protected String getClassNameImpl()
      Returns the type class of this file.
      Overrides:
      getClassNameImpl in class JNode
    • getClassRefImpl

      protected JClassRef getClassRefImpl()
      Returns the class reference for this node.
      Overrides:
      getClassRefImpl in class JNode
    • getClassRef

      public JClassRef getClassRef(String aClassName)
      Returns a class reference for a fully specified class name.
    • getException

      public Exception getException()
      Returns the exception if one was hit.
    • setException

      public void setException(Exception anException)
      Sets the exception.
    • init

      protected void init(JFile aJFile)
      Init from another JFile.