Class ClassData
- java.lang.Object
- 
- com.inductiveautomation.snap.filedata.SnapData
- 
- com.inductiveautomation.snap.filedata.ClassData
 
 
- 
- All Implemented Interfaces:
- WebSite.Servlet
 
 public class ClassData extends SnapData implements WebSite.Servlet A file to represent a Java class.
- 
- 
Constructor SummaryConstructors Constructor Description ClassData()
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ClassDataget(WebFile aFile)Returns the ClassData for given file.java.lang.StringgetClassName()Returns the class name.java.lang.StringgetClassNameTop()Returns the top class name.java.lang.ClassgetCompiledClass()Returns the class compiled from this java file.java.lang.String[]getDependencies()Returns the list of class names that this class file is dependent on.booleangetHasMain()Returns whether class file has main method.java.lang.ObjectgetInstance()Returns a new instance of the compiled class of this java file.<T> TgetInstance(java.lang.Class<T> aClass)Returns a new instance of the compiled class of this java file as requested class, if applicable.WebURLgetInstanceURL(java.lang.Object anObj)Returns a URL for given instance.WebFilegetJavaFile()Returns the JavaFile for this class, if it can be found.java.lang.StringgetPackageName()Returns the package name.java.lang.ObjectgetURLInstance(WebURL aURL)Returns an instance for given id.ResponsehandleGet(Request aRequest)Returns a query file for given query.voidrunMain()Runs the main method of compiled class.- 
Methods inherited from class com.inductiveautomation.snap.filedata.SnapDatacreateBytes, createSourceURL, delete, get, getBytes, getInputStream, getSite, getSource, getSourceFile, getSourceURL, is, refresh, save, setBytes, setSource
 
- 
 
- 
- 
- 
Method Detail- 
getClassNamepublic java.lang.String getClassName() Returns the class name.
 - 
getClassNameToppublic java.lang.String getClassNameTop() Returns the top class name.
 - 
getPackageNamepublic java.lang.String getPackageName() Returns the package name.
 - 
getJavaFilepublic WebFile getJavaFile() Returns the JavaFile for this class, if it can be found.
 - 
getCompiledClasspublic java.lang.Class getCompiledClass() Returns the class compiled from this java file.
 - 
getInstancepublic java.lang.Object getInstance() Returns a new instance of the compiled class of this java file.
 - 
getInstancepublic <T> T getInstance(java.lang.Class<T> aClass) Returns a new instance of the compiled class of this java file as requested class, if applicable.
 - 
getInstanceURLpublic WebURL getInstanceURL(java.lang.Object anObj) Returns a URL for given instance.
 - 
getURLInstance@Nullable public java.lang.Object getURLInstance(WebURL aURL) Returns an instance for given id.
 - 
handleGet@Nonnull public Response handleGet(@Nonnull Request aRequest) Returns a query file for given query.- Specified by:
- handleGetin interface- WebSite.Servlet
 
 - 
getDependenciespublic java.lang.String[] getDependencies() Returns the list of class names that this class file is dependent on.
 - 
getHasMainpublic boolean getHasMain() Returns whether class file has main method.
 - 
runMainpublic void runMain() Runs the main method of compiled class.
 
- 
 
-