|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | ||||||||
java.lang.Objectjava.lang.Enum<JavaCompiler.CompilePolicy>
com.sun.tools.javac.main.JavaCompiler.CompilePolicy
protected static enum JavaCompiler.CompilePolicy
Control how the compiler's latter phases (attr, flow, desugar, generate) are connected. Each individual file is processed by each phase in turn, but with different compile policies, you can control the order in which each class is processed through its next phase.
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 Summary | |
|---|---|
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. |
|
| Method Summary | |
|---|---|
(package private) static JavaCompiler.CompilePolicy |
decode(java.lang.String option)
|
static JavaCompiler.CompilePolicy |
valueOf(java.lang.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're declared. |
| Methods inherited from class java.lang.Enum |
|---|
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Enum Constant Detail |
|---|
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
| Method Detail |
|---|
public static final JavaCompiler.CompilePolicy[] values()
for(JavaCompiler.CompilePolicy c : JavaCompiler.CompilePolicy.values())
System.out.println(c);
public static JavaCompiler.CompilePolicy valueOf(java.lang.String name)
name - the name of the enum constant to be returned.
java.lang.IllegalArgumentException - if this enum type has no constant
with the specified namestatic JavaCompiler.CompilePolicy decode(java.lang.String option)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | ||||||||