Package org.apache.jasper.compiler
Interface JavaCompiler
-
- All Known Implementing Classes:
AntJavaCompiler
,JDTJavaCompiler
,Jsr199JavaCompiler
,NullJavaCompiler
interface JavaCompiler
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description JavacErrorDetail[]
compile(java.lang.String className, Node.Nodes pageNodes)
Start Java compilationvoid
doJavaFile(boolean keep)
Remove/save the generated Java File from/to disklong
getClassLastModified()
Return the time the class file was generated.java.io.Writer
getJavaWriter(java.lang.String javaFileName, java.lang.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(java.lang.String className, java.lang.String classFileName)
Save the generated class file to disk, if not already done.void
setClassPath(java.util.List<java.io.File> cp)
Java Compiler options.void
setDebug(boolean debug)
void
setExtdirs(java.lang.String exts)
void
setSourceVM(java.lang.String sourceVM)
void
setTargetVM(java.lang.String targetVM)
-
-
-
Method Detail
-
compile
JavacErrorDetail[] compile(java.lang.String className, Node.Nodes pageNodes) throws JasperException
Start Java compilation- Parameters:
className
- Name of the class under compilationpageNode
- Internal form for the page, used for error line mapping- Throws:
JasperException
-
getJavaWriter
java.io.Writer getJavaWriter(java.lang.String javaFileName, java.lang.String javaEncoding) throws JasperException
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
void doJavaFile(boolean keep) throws JasperException
Remove/save the generated Java File from/to disk- Throws:
JasperException
-
getClassLastModified
long getClassLastModified()
Return the time the class file was generated.
-
saveClassFile
void saveClassFile(java.lang.String className, java.lang.String classFileName)
Save the generated class file to disk, if not already done.
-
setClassPath
void setClassPath(java.util.List<java.io.File> cp)
Java Compiler options.
-
setDebug
void setDebug(boolean debug)
-
setExtdirs
void setExtdirs(java.lang.String exts)
-
setTargetVM
void setTargetVM(java.lang.String targetVM)
-
setSourceVM
void setSourceVM(java.lang.String sourceVM)
-
init
void init(JspCompilationContext ctxt, ErrorDispatcher err, boolean suppressLogging)
Initializations
-
release
void release()
Release resouces used in the current compilation
-
-