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