import javax.lang.model.util.*;
@SupportedAnnotationTypes({"*"})
-@SupportedSourceVersion(SourceVersion.RELEASE_5)
public class Collector extends AbstractProcessor {
private ProcessingEnvironment cfg;
private Elements eu;
+ private boolean verbose = false;
public void init(ProcessingEnvironment cfg) {
this.cfg = cfg;
}
TypeElement type = (TypeElement)e;
String nm = tn(type);
- if(!prev.contains(nm))
+ if(!prev.contains(nm) && verbose)
cfg.getMessager().printMessage(Diagnostic.Kind.NOTE, "added " + nm, type);
found.add(nm);
carry.remove(nm);
TypeElement el = types.get(nm);
if(el != null) {
i.remove();
- cfg.getMessager().printMessage(Diagnostic.Kind.NOTE, "removed " + nm, el);
+ if(verbose)
+ cfg.getMessager().printMessage(Diagnostic.Kind.NOTE, "removed " + nm, el);
}
}
List<String> all = new ArrayList<String>();
}
return(false);
}
+
+ public SourceVersion getSupportedSourceVersion() {
+ return(SourceVersion.latest());
+ }
}