< prev index next >

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

Print this page

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

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