< prev index next >

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

Print this page

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

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