Package play.classloading
Class ApplicationClasses.ApplicationClass
- java.lang.Object
-
- play.classloading.ApplicationClasses.ApplicationClass
-
- Enclosing class:
- ApplicationClasses
public static class ApplicationClasses.ApplicationClass extends java.lang.Object
Represent a application class
-
-
Field Summary
Fields Modifier and Type Field Description byte[]
enhancedByteCode
The enhanced byteCodebyte[]
javaByteCode
The compiled byteCodejava.lang.Class<?>
javaClass
The in JVM loaded classVirtualFile
javaFile
A reference to the java source filejava.lang.Package
javaPackage
The in JVM loaded packagejava.lang.String
javaSource
The Java sourcejava.lang.String
name
The fully qualified class nameint
sigChecksum
Signatures checksumjava.lang.Long
timestamp
Last 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 sourcevoid
compiled(byte[] code)
Call back when a class is compiled.byte[]
enhance()
Enhance this classjava.lang.String
getPackage()
boolean
isClass()
static boolean
isClass(java.lang.String name)
boolean
isDefinable()
Is this class already compiled but not defined ?void
refresh()
Need to refresh this class !java.lang.String
toString()
void
uncompile()
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:
toString
in classjava.lang.Object
-
-