Package org.apache.jasper.compiler
Class Jsr199JavaCompiler
- java.lang.Object
-
- org.apache.jasper.compiler.Jsr199JavaCompiler
-
public class Jsr199JavaCompiler extends Object
Invoke Java Compiler per JSR 199, using in-memory storage for both the input Java source and the generated bytecodes.- Author:
- Kin-man Chung
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classJsr199JavaCompiler.BytecodeFile
-
Field Summary
Fields Modifier and Type Field Description protected CharArrayWritercharArrayWriterprotected ArrayList<Jsr199JavaCompiler.BytecodeFile>classFilesprotected List<File>cpathprotected StringjavaEncodingprotected StringjavaFileNameprotected ArrayList<String>options
-
Constructor Summary
Constructors Constructor Description Jsr199JavaCompiler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JavacErrorDetail[]compile(String className, org.apache.jasper.compiler.Node.Nodes pageNodes)voiddoJavaFile(boolean keep)longgetClassLastModified()protected JavaFileManagergetJavaFileManager(JavaFileManager fm)WritergetJavaWriter(String javaFileName, String javaEncoding)protected JavaFileObjectgetOutputFile(String className, URI uri)voidinit(JspCompilationContext ctxt, ErrorDispatcher errDispatcher, boolean suppressLogging)voidrelease()voidsaveClassFile(String className, String classFileName)voidsetClassPath(List<File> path)voidsetDebug(boolean debug)voidsetExtdirs(String exts)voidsetSourceVM(String sourceVM)voidsetTargetVM(String targetVM)
-
-
-
Field Detail
-
classFiles
protected ArrayList<Jsr199JavaCompiler.BytecodeFile> classFiles
-
charArrayWriter
protected CharArrayWriter charArrayWriter
-
javaFileName
protected String javaFileName
-
javaEncoding
protected String javaEncoding
-
-
Method Detail
-
init
public void init(JspCompilationContext ctxt, ErrorDispatcher errDispatcher, boolean suppressLogging)
-
release
public void release()
-
setExtdirs
public void setExtdirs(String exts)
-
setSourceVM
public void setSourceVM(String sourceVM)
-
setTargetVM
public void setTargetVM(String targetVM)
-
doJavaFile
public void doJavaFile(boolean keep) throws JasperException- Throws:
JasperException
-
setDebug
public void setDebug(boolean debug)
-
getClassLastModified
public long getClassLastModified()
-
compile
public JavacErrorDetail[] compile(String className, org.apache.jasper.compiler.Node.Nodes pageNodes) throws JasperException
- Throws:
JasperException
-
getOutputFile
protected JavaFileObject getOutputFile(String className, URI uri)
-
getJavaFileManager
protected JavaFileManager getJavaFileManager(JavaFileManager fm)
-
-