protected static enum JavaCompiler.CompilePolicy extends Enum<JavaCompiler.CompilePolicy>
Generally speaking, the compiler will "fail fast" in the face of errors, although not aggressively so. flow, desugar, etc become no-ops once any errors have occurred. No attempt is currently made to determine if it might be safe to process a class through its next phase because it does not depend on any unrelated errors that might have occurred.
Enum Constant and Description |
---|
ATTR_ONLY
Just attribute the parse trees.
|
BY_FILE
Groups the classes for each source file together, then process
each group in a manner equivalent to the
SIMPLE policy. |
BY_TODO
Completely process each entry on the todo list in turn.
|
CHECK_ONLY
Just attribute and do flow analysis on the parse trees.
|
SIMPLE
Attribute everything, then do flow analysis for everything,
then desugar everything, and only then generate output.
|
Modifier and Type | Method and Description |
---|---|
static JavaCompiler.CompilePolicy |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static JavaCompiler.CompilePolicy[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final JavaCompiler.CompilePolicy ATTR_ONLY
public static final JavaCompiler.CompilePolicy CHECK_ONLY
public static final JavaCompiler.CompilePolicy SIMPLE
public static final JavaCompiler.CompilePolicy BY_FILE
SIMPLE
policy.
This means no output will be generated if there are any
errors in any of the classes in a source file.public static final JavaCompiler.CompilePolicy BY_TODO
public static JavaCompiler.CompilePolicy[] values()
for (JavaCompiler.CompilePolicy c : JavaCompiler.CompilePolicy.values()) System.out.println(c);
public static JavaCompiler.CompilePolicy valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullCopyright © 2017 earcam. All rights reserved.