Moved the generation of the Trees object to init(), as it seems to be the same on every round.

This commit is contained in:
Reinier Zwitserloot committed 2009-06-16 13:58:28 +02:00
1 parent d289910196
commit aa6d2e262f
1 file changed
+1 -1
+1 -1
View File
@@ -31,13 +31,13 @@ public class Processor extends AbstractProcessor {
else {
this.processingEnv = (JavacProcessingEnvironment) processingEnv;
handlers = HandlerLibrary.load(processingEnv.getMessager());
trees = Trees.instance(processingEnv);
}
}
@Override public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) {
if ( processingEnv == null ) return false;
trees = Trees.instance(processingEnv);
for ( TypeElement annotationType : annotations ) {
if ( !handlers.hasHandlerFor(annotationType) ) continue;