@@ -160,17 +160,6 @@ private static String version(String key) {
160
160
* it does not depend on any unrelated errors that might have occurred.
161
161
*/
162
162
protected static enum CompilePolicy {
163
- /**
164
- * Just attribute the parse trees.
165
- */
166
- ATTR_ONLY ,
167
-
168
- /**
169
- * Just attribute and do flow analysis on the parse trees.
170
- * This should catch most user errors.
171
- */
172
- CHECK_ONLY ,
173
-
174
163
/**
175
164
* Attribute everything, then do flow analysis for everything,
176
165
* then desugar everything, and only then generate output.
@@ -198,10 +187,6 @@ protected static enum CompilePolicy {
198
187
static CompilePolicy decode (String option ) {
199
188
if (option == null )
200
189
return DEFAULT_COMPILE_POLICY ;
201
- else if (option .equals ("attr" ))
202
- return ATTR_ONLY ;
203
- else if (option .equals ("check" ))
204
- return CHECK_ONLY ;
205
190
else if (option .equals ("simple" ))
206
191
return SIMPLE ;
207
192
else if (option .equals ("byfile" ))
@@ -443,11 +428,7 @@ public JavaCompiler(Context context) {
443
428
444
429
verboseCompilePolicy = options .isSet ("verboseCompilePolicy" );
445
430
446
- if (options .isSet ("should-stop.at" ) &&
447
- CompileState .valueOf (options .get ("should-stop.at" )) == CompileState .ATTR )
448
- compilePolicy = CompilePolicy .ATTR_ONLY ;
449
- else
450
- compilePolicy = CompilePolicy .decode (options .get ("compilePolicy" ));
431
+ compilePolicy = CompilePolicy .decode (options .get ("compilePolicy" ));
451
432
452
433
implicitSourcePolicy = ImplicitSourcePolicy .decode (options .get ("-implicit" ));
453
434
@@ -948,14 +929,6 @@ public void compile(Collection<JavaFileObject> sourceFileObjects,
948
929
949
930
if (!CompileState .ATTR .isAfter (shouldStopPolicyIfNoError )) {
950
931
switch (compilePolicy ) {
951
- case ATTR_ONLY :
952
- attribute (todo );
953
- break ;
954
-
955
- case CHECK_ONLY :
956
- flow (attribute (todo ));
957
- break ;
958
-
959
932
case SIMPLE :
960
933
generate (desugar (flow (attribute (todo ))));
961
934
break ;
0 commit comments