Package play.classloading
Class ApplicationClasses.ApplicationClass
- java.lang.Object
-
- play.classloading.ApplicationClasses.ApplicationClass
-
- Enclosing class:
- ApplicationClasses
public static class ApplicationClasses.ApplicationClass extends java.lang.ObjectRepresent a application class
-
-
Field Summary
Fields Modifier and Type Field Description byte[]enhancedByteCodeThe enhanced byteCodebyte[]javaByteCodeThe compiled byteCodejava.lang.Class<?>javaClassThe in JVM loaded classVirtualFilejavaFileA reference to the java source filejava.lang.PackagejavaPackageThe in JVM loaded packagejava.lang.StringjavaSourceThe Java sourcejava.lang.StringnameThe fully qualified class nameintsigChecksumSignatures checksumjava.lang.LongtimestampLast time than this class was compiled
-
Constructor Summary
Constructors Constructor Description ApplicationClass()ApplicationClass(java.lang.String name)ApplicationClass(java.lang.String name, VirtualFile javaFile)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]compile()Compile the class from Java sourcevoidcompiled(byte[] code)Call back when a class is compiled.byte[]enhance()Enhance this classjava.lang.StringgetPackage()booleanisClass()static booleanisClass(java.lang.String name)booleanisDefinable()Is this class already compiled but not defined ?voidrefresh()Need to refresh this class !java.lang.StringtoString()voiduncompile()Unload the class
-
-
-
Field Detail
-
name
public java.lang.String name
The fully qualified class name
-
javaFile
public VirtualFile javaFile
A reference to the java source file
-
javaSource
public java.lang.String javaSource
The Java source
-
javaByteCode
public byte[] javaByteCode
The compiled byteCode
-
enhancedByteCode
public byte[] enhancedByteCode
The enhanced byteCode
-
javaClass
public java.lang.Class<?> javaClass
The in JVM loaded class
-
javaPackage
public java.lang.Package javaPackage
The in JVM loaded package
-
timestamp
public java.lang.Long timestamp
Last time than this class was compiled
-
sigChecksum
public int sigChecksum
Signatures checksum
-
-
Constructor Detail
-
ApplicationClass
public ApplicationClass()
-
ApplicationClass
public ApplicationClass(java.lang.String name)
-
ApplicationClass
public ApplicationClass(java.lang.String name, VirtualFile javaFile)
-
-
Method Detail
-
refresh
public final void refresh()
Need to refresh this class !
-
enhance
public byte[] enhance()
Enhance this class- Returns:
- the enhanced byteCode
-
isDefinable
public boolean isDefinable()
Is this class already compiled but not defined ?- Returns:
- if the class is compiled but not defined
-
isClass
public boolean isClass()
-
isClass
public static boolean isClass(java.lang.String name)
-
getPackage
public java.lang.String getPackage()
-
compile
public byte[] compile()
Compile the class from Java source- Returns:
- the bytes that comprise the class file
-
uncompile
public void uncompile()
Unload the class
-
compiled
public void compiled(byte[] code)
Call back when a class is compiled.- Parameters:
code- The bytecode.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-