public class SimpleCompiler extends Cookable implements ISimpleCompiler
javax.tools-based implementation of ISimpleCompiler.| Constructor and Description |
|---|
SimpleCompiler() |
SimpleCompiler(JavaCompiler javaCompiler)
Initializes with a different,
javax.tools.JavaCompiler-compatible Java compiler. |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addOffset(String fileName)
Derived classes call this method to "reset" the current line and column number at the currently read input
character, and also changes the "file name" (see
cook(String, Reader)). |
void |
cook(String fileName,
Reader r) |
Map<String,byte[]> |
getBytecodes() |
ClassLoader |
getClassLoader() |
void |
setCompileErrorHandler(ErrorHandler compileErrorHandler) |
void |
setDebuggingInformation(boolean debugSource,
boolean debugLines,
boolean debugVars) |
void |
setParentClassLoader(ClassLoader parentClassLoader) |
void |
setParentClassLoader(ClassLoader parentClassLoader,
Class<?>[] auxiliaryClasses)
Deprecated.
Auxiliary classes never really worked... don't use them.
|
void |
setSourceVersion(int version) |
void |
setTargetVersion(int version) |
void |
setWarningHandler(WarningHandler warningHandler) |
cook, cook, cook, cook, cook, cook, cook, cookFile, cookFile, cookFile, cookFilepublic SimpleCompiler()
public SimpleCompiler(JavaCompiler javaCompiler)
javax.tools.JavaCompiler-compatible Java compiler.public void setSourceVersion(int version)
setSourceVersion in interface ICookablepublic void setTargetVersion(int version)
setTargetVersion in interface ICookablepublic Map<String,byte[]> getBytecodes()
getBytecodes in interface ICookablepublic ClassLoader getClassLoader()
getClassLoader in interface ISimpleCompilerpublic void cook(@Nullable String fileName, Reader r) throws CompileException, IOException
cook in interface ICookablecook in class CookableCompileExceptionIOExceptionpublic void setDebuggingInformation(boolean debugSource,
boolean debugLines,
boolean debugVars)
setDebuggingInformation in interface ISimpleCompilerpublic void setParentClassLoader(@Nullable ClassLoader parentClassLoader)
setParentClassLoader in interface ISimpleCompiler@Deprecated public void setParentClassLoader(@Nullable ClassLoader parentClassLoader, Class<?>[] auxiliaryClasses)
public void setCompileErrorHandler(@Nullable ErrorHandler compileErrorHandler)
setCompileErrorHandler in interface ISimpleCompilerpublic void setWarningHandler(@Nullable WarningHandler warningHandler)
setWarningHandler in interface ISimpleCompilerprotected void addOffset(@Nullable String fileName)
cook(String, Reader)).Copyright © 2022. All rights reserved.