public class Jsr199JavaCompiler extends Object
Modifier and Type | Class and Description |
---|---|
protected static class |
Jsr199JavaCompiler.BytecodeFile |
Modifier and Type | Field and Description |
---|---|
protected CharArrayWriter |
charArrayWriter |
protected ArrayList<Jsr199JavaCompiler.BytecodeFile> |
classFiles |
protected List<File> |
cpath |
protected String |
javaEncoding |
protected String |
javaFileName |
protected ArrayList<String> |
options |
Constructor and Description |
---|
Jsr199JavaCompiler() |
Modifier and Type | Method and Description |
---|---|
JavacErrorDetail[] |
compile(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 JavaFileManager |
getJavaFileManager(JavaFileManager fm) |
Writer |
getJavaWriter(String javaFileName,
String javaEncoding)
Get a Writer for the Java file.
|
protected JavaFileObject |
getOutputFile(String className,
URI uri) |
void |
init(JspCompilationContext ctxt,
ErrorDispatcher errDispatcher,
boolean suppressLogging)
Initializations
|
void |
release()
Release resouces used in the current compilation
|
void |
saveClassFile(String className,
String classFileName)
Save the generated class file to disk, if not already done.
|
void |
setClassPath(List<File> path)
Java Compiler options.
|
void |
setDebug(boolean debug) |
void |
setExtdirs(String exts) |
void |
setSourceVM(String sourceVM) |
void |
setTargetVM(String targetVM) |
protected ArrayList<Jsr199JavaCompiler.BytecodeFile> classFiles
protected CharArrayWriter charArrayWriter
protected String javaFileName
protected String javaEncoding
public void init(JspCompilationContext ctxt, ErrorDispatcher errDispatcher, boolean suppressLogging)
public void release()
public void setExtdirs(String exts)
public void setSourceVM(String sourceVM)
public void setTargetVM(String targetVM)
public void saveClassFile(String className, String classFileName)
public void doJavaFile(boolean keep) throws JasperException
JasperException
public void setDebug(boolean debug)
public Writer getJavaWriter(String javaFileName, String javaEncoding)
public long getClassLastModified()
public JavacErrorDetail[] compile(String className, Node.Nodes pageNodes) throws JasperException
className
- Name of the class under compilationJasperException
protected JavaFileObject getOutputFile(String className, URI uri)
protected JavaFileManager getJavaFileManager(JavaFileManager fm)
Copyright © 2019 Oracle. All rights reserved.