1.1 --- a/src/share/classes/com/sun/tools/javac/processing/JavacProcessingEnvironment.java Fri Feb 26 15:30:35 2010 -0800 1.2 +++ b/src/share/classes/com/sun/tools/javac/processing/JavacProcessingEnvironment.java Tue Mar 02 14:06:47 2010 -0800 1.3 @@ -799,9 +799,6 @@ 1.4 PrintWriter xout = context.get(Log.outKey); 1.5 TaskListener taskListener = context.get(TaskListener.class); 1.6 1.7 - 1.8 - AnnotationCollector collector = new AnnotationCollector(); 1.9 - 1.10 JavaCompiler compiler = JavaCompiler.instance(context); 1.11 compiler.todo.clear(); // free the compiler's resources 1.12 1.13 @@ -1220,45 +1217,6 @@ 1.14 return false; 1.15 } 1.16 1.17 - private static class AnnotationCollector extends TreeScanner { 1.18 - List<JCTree> path = List.nil(); 1.19 - static final boolean verbose = false; 1.20 - List<JCAnnotation> annotations = List.nil(); 1.21 - 1.22 - public List<JCAnnotation> findAnnotations(List<? extends JCTree> nodes) { 1.23 - annotations = List.nil(); 1.24 - scan(nodes); 1.25 - List<JCAnnotation> found = annotations; 1.26 - annotations = List.nil(); 1.27 - return found.reverse(); 1.28 - } 1.29 - 1.30 - public void scan(JCTree node) { 1.31 - if (node == null) 1.32 - return; 1.33 - Symbol sym = TreeInfo.symbolFor(node); 1.34 - if (sym != null) 1.35 - path = path.prepend(node); 1.36 - super.scan(node); 1.37 - if (sym != null) 1.38 - path = path.tail; 1.39 - } 1.40 - 1.41 - public void visitAnnotation(JCAnnotation node) { 1.42 - annotations = annotations.prepend(node); 1.43 - if (verbose) { 1.44 - StringBuilder sb = new StringBuilder(); 1.45 - for (JCTree tree : path.reverse()) { 1.46 - System.err.print(sb); 1.47 - System.err.println(TreeInfo.symbolFor(tree)); 1.48 - sb.append(" "); 1.49 - } 1.50 - System.err.print(sb); 1.51 - System.err.println(node); 1.52 - } 1.53 - } 1.54 - } 1.55 - 1.56 private static <T extends JCTree> List<T> cleanTrees(List<T> nodes) { 1.57 for (T node : nodes) 1.58 treeCleaner.scan(node);