Interface JavaCompiler

All Known Implementing Classes:
AntJavaCompiler, JDTJavaCompiler, Jsr199JavaCompiler, NullJavaCompiler

interface JavaCompiler
  • Method Details

    • compile

      JavacErrorDetail[] compile(String className, Node.Nodes pageNodes) throws JasperException
      Start Java compilation
      Parameters:
      className - Name of the class under compilation
      pageNode - Internal form for the page, used for error line mapping
      Throws:
      JasperException
    • getJavaWriter

      Writer getJavaWriter(String javaFileName, 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(String className, String classFileName)
      Save the generated class file to disk, if not already done.
    • setClassPath

      void setClassPath(List<File> cp)
      Java Compiler options.
    • setDebug

      void setDebug(boolean debug)
    • setExtdirs

      void setExtdirs(String exts)
    • setTargetVM

      void setTargetVM(String targetVM)
    • setSourceVM

      void setSourceVM(String sourceVM)
    • init

      void init(JspCompilationContext ctxt, ErrorDispatcher err, boolean suppressLogging)
      Initializations
    • release

      void release()
      Release resouces used in the current compilation