public abstract class Compiler extends Object
compile(javax.tools.JavaFileObject...) Java source files.| Constructor and Description |
|---|
Compiler() |
| Modifier and Type | Method and Description |
|---|---|
Compilation |
compile(Iterable<? extends JavaFileObject> files)
Compiles Java source files.
|
Compilation |
compile(JavaFileObject... files)
Compiles Java source files.
|
static Compiler |
compiler(JavaCompiler javaCompiler)
Returns a
Compiler that uses a given JavaCompiler instance. |
static Compiler |
javac()
Returns the
javac compiler. |
abstract com.google.common.collect.ImmutableList<String> |
options()
The options passed to the compiler.
|
abstract com.google.common.collect.ImmutableList<Processor> |
processors()
The annotation processors applied during compilation.
|
Compiler |
withClasspathFrom(ClassLoader classloader)
Uses the classpath from the passed on classloader (and its parents) for the compilation
instead of the system classpath.
|
Compiler |
withOptions(Iterable<?> options)
Passes command-line options to the compiler.
|
Compiler |
withOptions(Object... options)
Passes command-line options to the compiler.
|
Compiler |
withProcessors(Iterable<? extends Processor> processors)
Uses annotation processors during compilation.
|
Compiler |
withProcessors(Processor... processors)
Uses annotation processors during compilation.
|
public static Compiler javac()
javac compiler.public static Compiler compiler(JavaCompiler javaCompiler)
Compiler that uses a given JavaCompiler instance.public abstract com.google.common.collect.ImmutableList<Processor> processors()
public abstract com.google.common.collect.ImmutableList<String> options()
public final Compiler withProcessors(Processor... processors)
Note that most annotation processors cannot be reused for more than one compilation.
public final Compiler withProcessors(Iterable<? extends Processor> processors)
Note that most annotation processors cannot be reused for more than one compilation.
public final Compiler withOptions(Object... options)
public final Compiler withOptions(Iterable<?> options)
public final Compiler withClasspathFrom(ClassLoader classloader)
IllegalArgumentException - if the given classloader had classpaths which we could not
determine or use for compilation.public final Compilation compile(JavaFileObject... files)
public final Compilation compile(Iterable<? extends JavaFileObject> files)
Copyright © 2013-2017. All Rights Reserved.