< prev index next >

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

Print this page

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

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