|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ICookable
"Cooking" means scanning a sequence of characters and turning them into some
JVM-executable artifact. For example, if you cook a ClassBodyEvaluator
, then the tokens are interpreted as a class body and
compiled into a Class
which is accessible through IClassBodyEvaluator.getClazz()
.
The cook*()
methods eventually invoke the abstract cook(String, Reader)
method.
Field Summary | |
---|---|
static java.lang.ClassLoader |
BOOT_CLASS_LOADER
The ClassLoader that loads this classes on the boot class path, i.e. |
static java.lang.String |
SYSTEM_PROPERTY_SOURCE_DEBUGGING_DIR
Value 'org.codehaus.janino.source_debugging.dir'. |
static java.lang.String |
SYSTEM_PROPERTY_SOURCE_DEBUGGING_ENABLE
Value 'org.codehaus.janino.source_debugging.enable'. |
Method Summary | |
---|---|
void |
cook(java.io.InputStream is)
Reads, scans, parses and compiles Java tokens from the given InputStream , encoded
in the "platform default encoding". |
void |
cook(java.io.InputStream is,
java.lang.String optionalEncoding)
Reads, scans, parses and compiles Java tokens from the given InputStream with the
given encoding . |
void |
cook(java.io.Reader r)
Reads, scans, parses and compiles Java tokens from the given Reader . |
void |
cook(java.lang.String s)
Reads, scans, parses and compiles Java tokens from the given String . |
void |
cook(java.lang.String optionalFileName,
java.io.InputStream is)
Reads, scans, parses and compiles Java tokens from the given InputStream , encoded
in the "platform default encoding". |
void |
cook(java.lang.String optionalFileName,
java.io.InputStream is,
java.lang.String optionalEncoding)
Reads, scans, parses and compiles Java tokens from the given InputStream with the
given encoding . |
void |
cook(java.lang.String optionalFileName,
java.io.Reader r)
Reads, scans, parses and compiles Java tokens from the given Reader . |
void |
cook(java.lang.String optionalFileName,
java.lang.String s)
Reads, scans, parses and compiles Java tokens from the given String . |
void |
cookFile(java.io.File file)
Reads, scans, parses and compiles Java tokens from the given File , encoded
in the "platform default encoding". |
void |
cookFile(java.io.File file,
java.lang.String optionalEncoding)
Reads, scans, parses and compiles Java tokens from the given File with the
given encoding . |
void |
cookFile(java.lang.String fileName)
Reads, scans, parses and compiles Java tokens from the named file, encoded in the "platform default encoding". |
void |
cookFile(java.lang.String fileName,
java.lang.String optionalEncoding)
Reads, scans, parses and compiles Java tokens from the named file with the given encoding . |
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. |
Field Detail |
---|
static final java.lang.ClassLoader BOOT_CLASS_LOADER
ClassLoader
that loads this classes on the boot class path, i.e. the JARs in the JRE's "lib" and
"lib/ext" directories, but not the JARs and class directories specified through the class path.
static final java.lang.String SYSTEM_PROPERTY_SOURCE_DEBUGGING_ENABLE
Setting this system property to 'true' enables source-level debugging. Typically, this means that compilation is executed with '-g:all' instead of '-g:none'.
static final java.lang.String SYSTEM_PROPERTY_SOURCE_DEBUGGING_DIR
If source code is not compiled from a file, debuggers have a hard time locating the source file for source-level debugging. As a workaround, a copy of the source code is written to a temporary file, which must be included in the debugger's source path. If this system property is set, the temporary source file is created in that directory, otherwise in the default temporary-file directory.
File.createTempFile(String, String, File)
,
Constant Field ValuesMethod Detail |
---|
void setParentClassLoader(java.lang.ClassLoader optionalParentClassLoader)
System.getSystemClassLoader() |
The running JVM's class path |
Thread.currentThread().getContextClassLoader() or null |
The class loader effective for the invoking thread |
BOOT_CLASS_LOADER |
The running JVM's boot class path |
void setDebuggingInformation(boolean debugSource, boolean debugLines, boolean debugVars)
void cook(java.lang.String optionalFileName, java.io.Reader r) throws CompileException, java.io.IOException
Reader
.
optionalFileName
- Used when reporting errors and warnings.
CompileException
java.io.IOException
void cook(java.io.Reader r) throws CompileException, java.io.IOException
Reader
.
CompileException
java.io.IOException
void cook(java.io.InputStream is) throws CompileException, java.io.IOException
InputStream
, encoded
in the "platform default encoding".
CompileException
java.io.IOException
void cook(java.lang.String optionalFileName, java.io.InputStream is) throws CompileException, java.io.IOException
InputStream
, encoded
in the "platform default encoding".
optionalFileName
- Used when reporting errors and warnings.
CompileException
java.io.IOException
void cook(java.io.InputStream is, java.lang.String optionalEncoding) throws CompileException, java.io.IOException
InputStream
with the
given encoding
.
CompileException
java.io.IOException
void cook(java.lang.String optionalFileName, java.io.InputStream is, java.lang.String optionalEncoding) throws CompileException, java.io.IOException
InputStream
with the
given encoding
.
optionalFileName
- Used when reporting errors and warnings.
CompileException
java.io.IOException
void cook(java.lang.String s) throws CompileException
String
.
CompileException
void cook(java.lang.String optionalFileName, java.lang.String s) throws CompileException
String
.
optionalFileName
- Used when reporting errors and warnings.
CompileException
void cookFile(java.io.File file) throws CompileException, java.io.IOException
File
, encoded
in the "platform default encoding".
CompileException
java.io.IOException
void cookFile(java.io.File file, java.lang.String optionalEncoding) throws CompileException, java.io.IOException
File
with the
given encoding
.
CompileException
java.io.IOException
void cookFile(java.lang.String fileName) throws CompileException, java.io.IOException
CompileException
java.io.IOException
void cookFile(java.lang.String fileName, java.lang.String optionalEncoding) throws CompileException, java.io.IOException
encoding
.
CompileException
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |