< prev index next >

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

Print this page

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

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