Package org.apache.jasper.compiler
Interface JavaCompiler
- All Known Implementing Classes:
AntJavaCompiler
,JDTJavaCompiler
,Jsr199JavaCompiler
,NullJavaCompiler
interface JavaCompiler
-
Method Summary
Modifier and TypeMethodDescriptioncompile
(String className, Node.Nodes pageNodes) Start Java compilationvoid
doJavaFile
(boolean keep) Remove/save the generated Java File from/to disklong
Return the time the class file was generated.getJavaWriter
(String javaFileName, String javaEncoding) Get a Writer for the Java file.void
init
(JspCompilationContext ctxt, ErrorDispatcher err, boolean suppressLogging) Initializationsvoid
release()
Release resouces used in the current compilationvoid
saveClassFile
(String className, String classFileName) Save the generated class file to disk, if not already done.void
setClassPath
(List<File> cp) Java Compiler options.void
setDebug
(boolean debug) void
setExtdirs
(String exts) void
setSourceVM
(String sourceVM) void
setTargetVM
(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
Save the generated class file to disk, if not already done. -
setClassPath
Java Compiler options. -
setDebug
void setDebug(boolean debug) -
setExtdirs
-
setTargetVM
-
setSourceVM
-
init
Initializations -
release
void release()Release resouces used in the current compilation
-