< prev index next >

src/jdk.compiler/share/classes/com/sun/tools/javac/processing/JavacProcessingEnvironment.java

Print this page

1255             modules.newRound();
1256             types.newRound();
1257             annotate.newRound();
1258             elementUtils.newRound();
1259 
1260             boolean foundError = false;
1261 
1262             for (ClassSymbol cs : symtab.getAllClasses()) {
1263                 if (cs.kind == ERR) {
1264                     foundError = true;
1265                     break;
1266                 }
1267             }
1268 
1269             if (foundError) {
1270                 for (ClassSymbol cs : symtab.getAllClasses()) {
1271                     if (cs.classfile != null || cs.kind == ERR) {
1272                         Kinds.Kind symKind = cs.kind;
1273                         cs.reset();
1274                         if (symKind == ERR) {
1275                             cs.type = new ClassType(cs.type.getEnclosingType(), null, cs);
1276                         }
1277                         if (cs.isCompleted()) {
1278                             cs.completer = initialCompleter;
1279                         }
1280                     }
1281                 }
1282             }
1283         }
1284     }
1285 
1286 
1287     // TODO: internal catch clauses?; catch and rethrow an annotation
1288     // processing error
1289     public boolean doProcessing(List<JCCompilationUnit> roots,
1290                                 List<ClassSymbol> classSymbols,
1291                                 Iterable<? extends PackageSymbol> pckSymbols,
1292                                 Log.DeferredDiagnosticHandler deferredDiagnosticHandler) {
1293         final Set<JCCompilationUnit> treesToClean =
1294                 Collections.newSetFromMap(new IdentityHashMap<JCCompilationUnit, Boolean>());
1295 

1255             modules.newRound();
1256             types.newRound();
1257             annotate.newRound();
1258             elementUtils.newRound();
1259 
1260             boolean foundError = false;
1261 
1262             for (ClassSymbol cs : symtab.getAllClasses()) {
1263                 if (cs.kind == ERR) {
1264                     foundError = true;
1265                     break;
1266                 }
1267             }
1268 
1269             if (foundError) {
1270                 for (ClassSymbol cs : symtab.getAllClasses()) {
1271                     if (cs.classfile != null || cs.kind == ERR) {
1272                         Kinds.Kind symKind = cs.kind;
1273                         cs.reset();
1274                         if (symKind == ERR) {
1275                             cs.type = new ClassType(cs.type.getEnclosingType(), null, cs, List.nil());
1276                         }
1277                         if (cs.isCompleted()) {
1278                             cs.completer = initialCompleter;
1279                         }
1280                     }
1281                 }
1282             }
1283         }
1284     }
1285 
1286 
1287     // TODO: internal catch clauses?; catch and rethrow an annotation
1288     // processing error
1289     public boolean doProcessing(List<JCCompilationUnit> roots,
1290                                 List<ClassSymbol> classSymbols,
1291                                 Iterable<? extends PackageSymbol> pckSymbols,
1292                                 Log.DeferredDiagnosticHandler deferredDiagnosticHandler) {
1293         final Set<JCCompilationUnit> treesToClean =
1294                 Collections.newSetFromMap(new IdentityHashMap<JCCompilationUnit, Boolean>());
1295 
< prev index next >