public class Jsr199JavaCompiler extends java.lang.Object implements JavaCompiler
Modifier and Type | Class and Description |
---|---|
protected static class |
Jsr199JavaCompiler.BytecodeFile |
Modifier and Type | Field and Description |
---|---|
protected java.io.CharArrayWriter |
charArrayWriter |
protected java.util.ArrayList<Jsr199JavaCompiler.BytecodeFile> |
classFiles |
protected java.util.List<java.io.File> |
cpath |
private JspCompilationContext |
ctxt |
private ErrorDispatcher |
errDispatcher |
protected java.lang.String |
javaEncoding |
protected java.lang.String |
javaFileName |
protected java.util.ArrayList<java.lang.String> |
options |
private JspRuntimeContext |
rtctxt |
Constructor and Description |
---|
Jsr199JavaCompiler() |
Modifier and Type | Method and Description |
---|---|
JavacErrorDetail[] |
compile(java.lang.String className,
Node.Nodes pageNodes)
Start Java compilation
|
void |
doJavaFile(boolean keep)
Remove/save the generated Java File from/to disk
|
long |
getClassLastModified()
Return the time the class file was generated.
|
protected javax.tools.JavaFileManager |
getJavaFileManager(javax.tools.JavaFileManager fm) |
java.io.Writer |
getJavaWriter(java.lang.String javaFileName,
java.lang.String javaEncoding)
Get a Writer for the Java file.
|
protected javax.tools.JavaFileObject |
getOutputFile(java.lang.String className,
java.net.URI uri) |
void |
init(JspCompilationContext ctxt,
ErrorDispatcher errDispatcher,
boolean suppressLogging)
Initializations
|
void |
release()
Release resouces used in the current compilation
|
void |
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> path)
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) |
protected java.util.List<java.io.File> cpath
private JspRuntimeContext rtctxt
protected java.util.ArrayList<Jsr199JavaCompiler.BytecodeFile> classFiles
protected java.util.ArrayList<java.lang.String> options
protected java.io.CharArrayWriter charArrayWriter
private JspCompilationContext ctxt
protected java.lang.String javaFileName
protected java.lang.String javaEncoding
private ErrorDispatcher errDispatcher
public void init(JspCompilationContext ctxt, ErrorDispatcher errDispatcher, boolean suppressLogging)
JavaCompiler
init
in interface JavaCompiler
public void release()
JavaCompiler
release
in interface JavaCompiler
public void setClassPath(java.util.List<java.io.File> path)
JavaCompiler
setClassPath
in interface JavaCompiler
public void setExtdirs(java.lang.String exts)
setExtdirs
in interface JavaCompiler
public void setSourceVM(java.lang.String sourceVM)
setSourceVM
in interface JavaCompiler
public void setTargetVM(java.lang.String targetVM)
setTargetVM
in interface JavaCompiler
public void saveClassFile(java.lang.String className, java.lang.String classFileName)
JavaCompiler
saveClassFile
in interface JavaCompiler
public void doJavaFile(boolean keep) throws JasperException
JavaCompiler
doJavaFile
in interface JavaCompiler
JasperException
public void setDebug(boolean debug)
setDebug
in interface JavaCompiler
public java.io.Writer getJavaWriter(java.lang.String javaFileName, java.lang.String javaEncoding)
JavaCompiler
getJavaWriter
in interface JavaCompiler
public long getClassLastModified()
JavaCompiler
getClassLastModified
in interface JavaCompiler
public JavacErrorDetail[] compile(java.lang.String className, Node.Nodes pageNodes) throws JasperException
JavaCompiler
compile
in interface JavaCompiler
className
- Name of the class under compilationJasperException
protected javax.tools.JavaFileObject getOutputFile(java.lang.String className, java.net.URI uri)
protected javax.tools.JavaFileManager getJavaFileManager(javax.tools.JavaFileManager fm)