Class JavacJavaCompiler

java.lang.Object
org.codehaus.groovy.tools.javac.JavacJavaCompiler
All Implemented Interfaces:
JavaCompiler

public class JavacJavaCompiler extends Object implements JavaCompiler
JavaCompiler implementation that delegates to the JDK system Java compiler.
  • Constructor Details

    • JavacJavaCompiler

      public JavacJavaCompiler(CompilerConfiguration config)
      Creates a javac-backed compiler for the supplied configuration.
      Parameters:
      config - the compiler configuration to use
  • Method Details

    • compile

      public void compile(List<String> files, CompilationUnit cu)
      Compiles the supplied Java source files with javac and reports any errors back to the Groovy compilation unit.
      Specified by:
      compile in interface JavaCompiler
      Parameters:
      files - the Java source files to compile
      cu - the owning Groovy compilation unit