From: <cap...@us...> - 2007-10-11 16:32:05
|
Revision: 13780 http://jikesrvm.svn.sourceforge.net/jikesrvm/?rev=13780&view=rev Author: captain5050 Date: 2007-10-11 09:32:02 -0700 (Thu, 11 Oct 2007) Log Message: ----------- Make the default annotation adder asm task less verbose. Modified Paths: -------------- rvmroot/trunk/tools/asm-tasks/src/org/jikesrvm/tools/asm/AnnotationAdder.java Modified: rvmroot/trunk/tools/asm-tasks/src/org/jikesrvm/tools/asm/AnnotationAdder.java =================================================================== --- rvmroot/trunk/tools/asm-tasks/src/org/jikesrvm/tools/asm/AnnotationAdder.java 2007-10-11 16:08:08 UTC (rev 13779) +++ rvmroot/trunk/tools/asm-tasks/src/org/jikesrvm/tools/asm/AnnotationAdder.java 2007-10-11 16:32:02 UTC (rev 13780) @@ -47,6 +47,9 @@ * Add annotations to classes using the ASM framework. */ public final class AnnotationAdder { + /** Verbose debug information */ + private static final boolean VERBOSE = false; + /** * Elements we're looking to adapt and the annotations we want adding to them */ @@ -413,7 +416,7 @@ * @param fromName the name of the class we're coming from */ private static void adaptClass(String fromName) { - System.out.println("Adding annotations to class: " + fromName); + if (VERBOSE) System.out.println("Adding annotations to class: " + fromName); // gets an input stream to read the bytecode of the class String resource = fromName.replace('.', '/') + ".class"; @@ -477,7 +480,7 @@ if (mv != null) { Set<Class<? extends Annotation>> annotations = findAnnotationsForMethod(className, name, desc); if (annotations != null) { - System.out.println("Found method: " + name); + if (VERBOSE) System.out.println("Found method: " + name); return new AddAnnotationMethodAdapter(mv, annotations); } } @@ -513,7 +516,7 @@ @Override public AnnotationVisitor visitAnnotation(String desc, boolean visible) { presentAnnotations.add(desc); - System.out.println("Found annotation: " + desc); + if (VERBOSE) System.out.println("Found annotation: " + desc); return mv.visitAnnotation(desc, visible); } @@ -526,14 +529,14 @@ outer: for (Class<? extends Annotation> toAddAnn : toAddAnnotations) { Type toAddAnnType = Type.getType(toAddAnn); - System.out.println("Annotation: " + toAddAnn); + if (VERBOSE) System.out.println("Annotation: " + toAddAnn); for (String presentAnn : presentAnnotations) { if (toAddAnnType.equals(Type.getType(presentAnn))) { - System.out.println("Annotation already present: " + toAddAnn + " " + presentAnn); + if (VERBOSE) System.out.println("Annotation already present: " + toAddAnn + " " + presentAnn); continue outer; } } - System.out.println("Adding annotation: " + toAddAnn); + if (VERBOSE) System.out.println("Adding annotation: " + toAddAnn); mv.visitAnnotation("L"+toAddAnnType.getInternalName()+";", true); } mv.visitEnd(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |