|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.codehaus.commons.compiler.Cookable
org.codehaus.commons.compiler.jdk.SimpleCompiler
public class SimpleCompiler
| Field Summary |
|---|
| Fields inherited from interface org.codehaus.commons.compiler.ICookable |
|---|
BOOT_CLASS_LOADER, SYSTEM_PROPERTY_SOURCE_DEBUGGING_DIR, SYSTEM_PROPERTY_SOURCE_DEBUGGING_ENABLE |
| Constructor Summary | |
|---|---|
SimpleCompiler()
|
|
| Method Summary | |
|---|---|
protected void |
assertCooked()
Throw an IllegalStateException if this Cookable is not yet cooked. |
protected void |
assertNotCooked()
Throw an IllegalStateException if this Cookable is already cooked. |
protected void |
cook(javax.tools.JavaFileObject compilationUnit)
|
void |
cook(java.lang.String optionalFileName,
java.io.Reader r)
Reads, scans, parses and compiles Java tokens from the given Reader. |
java.lang.ClassLoader |
getClassLoader()
Returns a ClassLoader object through which the previously compiled classes can be accessed. |
void |
setDebuggingInformation(boolean debugSource,
boolean debugLines,
boolean debugVars)
Determines what kind of debugging information is included in the generates classes. |
void |
setParentClassLoader(java.lang.ClassLoader optionalParentClassLoader)
The "parent class loader" is used to load referenced classes. |
void |
setParentClassLoader(java.lang.ClassLoader optionalParentClassLoader,
java.lang.Class<?>[] auxiliaryClasses)
Deprecated. |
| Methods inherited from class org.codehaus.commons.compiler.Cookable |
|---|
cook, cook, cook, cook, cook, cook, cook, cookFile, cookFile, cookFile, cookFile, readString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.codehaus.commons.compiler.ICookable |
|---|
cook, cook, cook, cook, cook, cook, cook, cookFile, cookFile, cookFile, cookFile |
| Constructor Detail |
|---|
public SimpleCompiler()
| Method Detail |
|---|
public java.lang.ClassLoader getClassLoader()
ISimpleCompilerClassLoader object through which the previously compiled classes can be accessed. This ClassLoader can be used for subsequent ISimpleCompilers in order to compile compilation units that use
types (e.g. declare derived types) declared in the previous one.
This method must only be called after exactly on of the ICookable.cook(String, java.io.Reader) methods was called.
getClassLoader in interface ISimpleCompiler
public void cook(java.lang.String optionalFileName,
java.io.Reader r)
throws CompileException,
java.io.IOException
ICookableReader.
cook in interface ICookablecook in class CookableoptionalFileName - Used when reporting errors and warnings.
CompileException
java.io.IOException
protected void cook(javax.tools.JavaFileObject compilationUnit)
throws CompileException,
java.io.IOException
CompileException
java.io.IOException
public void setDebuggingInformation(boolean debugSource,
boolean debugLines,
boolean debugVars)
ICookable
setDebuggingInformation in interface ICookablepublic void setParentClassLoader(java.lang.ClassLoader optionalParentClassLoader)
ICookableSystem.getSystemClassLoader() |
The running JVM's class path |
Thread.currentThread().getContextClassLoader() or null |
The class loader effective for the invoking thread |
ICookable.BOOT_CLASS_LOADER |
The running JVM's boot class path |
setParentClassLoader in interface ICookable
@Deprecated
public void setParentClassLoader(java.lang.ClassLoader optionalParentClassLoader,
java.lang.Class<?>[] auxiliaryClasses)
optionalParentClassLoader - auxiliaryClasses - protected void assertCooked()
IllegalStateException if this Cookable is not yet cooked.
protected void assertNotCooked()
IllegalStateException if this Cookable is already cooked.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||