Interface JavaCompiler
- All Known Implementing Classes:
AntJavaCompiler, JDTJavaCompiler, Jsr199JavaCompiler, NullJavaCompiler
interface JavaCompiler
-
Method Summary
Modifier and TypeMethodDescriptioncompile(String className, Node.Nodes pageNodes) Start Java compilationvoiddoJavaFile(boolean keep) Remove/save the generated Java File from/to disklongReturn the time the class file was generated.getJavaWriter(String javaFileName, String javaEncoding) Get a Writer for the Java file.voidinit(JspCompilationContext ctxt, ErrorDispatcher err, boolean suppressLogging) Initializationsvoidrelease()Release resouces used in the current compilationvoidsaveClassFile(String className, String classFileName) Save the generated class file to disk, if not already done.voidsetClassPath(List<File> cp) Java Compiler options.voidsetDebug(boolean debug) voidsetExtdirs(String exts) voidsetSourceVM(String sourceVM) voidsetTargetVM(String targetVM)
-
Method Details
-
compile
Start Java compilation- Parameters:
className- Name of the class under compilationpageNode- Internal form for the page, used for error line mapping- Throws:
JasperException
-
getJavaWriter
Get a Writer for the Java file. The writer is used by JSP compiler. This method allows the Java compiler control where the Java file should be generated so it knows how to handle the input for java compilation accordingly.- Throws:
JasperException
-
doJavaFile
Remove/save the generated Java File from/to disk- Throws:
JasperException
-
getClassLastModified
long getClassLastModified()Return the time the class file was generated. -
saveClassFile
-
setClassPath
-
setDebug
void setDebug(boolean debug) -
setExtdirs
-
setTargetVM
-
setSourceVM
-
init
Initializations -
release
void release()Release resouces used in the current compilation
-