Class CodeCompiler.CodeGenCompiler

java.lang.Object
org.apache.drill.exec.compile.CodeCompiler.CodeGenCompiler
Enclosing class:
CodeCompiler

public static class CodeCompiler.CodeGenCompiler extends Object
Abstracts out the details of compiling code using the two available mechanisms. Allows this mechanism to be unit tested separately from the code cache.
  • Constructor Details

  • Method Details

    • compile

      public Class<?> compile(CodeGenerator<?> cg) throws Exception
      Compile the code already generated by the code generator.
      Parameters:
      cg - the code generator for the class
      Returns:
      the compiled class
      Throws:
      Exception - if anything goes wrong
    • generateAndCompile

      public Class<?> generateAndCompile(CodeGenerator<?> cg) throws Exception
      Generate code for the code generator, then compile it.
      Parameters:
      cg - the code generator for the class
      Returns:
      the compiled class
      Throws:
      Exception - if anything goes wrong