private void processImpl(RoundEnvironment env) { // TODO run verifications that other annotations are not processed out of scope of the // operation or type lattice. try { ProcessorContext.setThreadLocalInstance(new ProcessorContext(processingEnv, this)); for (AnnotationProcessor<?> generator : getGenerators()) { AbstractParser<?> parser = generator.getParser(); if (parser.getAnnotationType() != null) { for (Element e : env.getElementsAnnotatedWith(parser.getAnnotationType())) { processElement(generator, e, false); } } for (Class<? extends Annotation> annotationType : parser.getTypeDelegatedAnnotationTypes()) { for (Element e : env.getElementsAnnotatedWith(annotationType)) { TypeElement processedType; if (parser.isDelegateToRootDeclaredType()) { processedType = ElementUtils.findRootEnclosingType(e); } else { processedType = ElementUtils.findNearestEnclosingType(e); } processElement(generator, processedType, false); } } } } finally { ProcessorContext.setThreadLocalInstance(null); } }
private void processImpl(RoundEnvironment env) { // TODO run verifications that other annotations are not processed out of scope of the // operation or typelattice. try { ProcessorContext.setThreadLocalInstance(new ProcessorContext(processingEnv, this)); for (AnnotationProcessor<?> generator : getGenerators()) { AbstractParser<?> parser = generator.getParser(); if (parser.getAnnotationType() != null) { for (Element e : env.getElementsAnnotatedWith(parser.getAnnotationType())) { processElement(generator, e, false); } } for (Class<? extends Annotation> annotationType : parser.getTypeDelegatedAnnotationTypes()) { for (Element e : env.getElementsAnnotatedWith(annotationType)) { TypeElement processedType; if (parser.isDelegateToRootDeclaredType()) { processedType = ElementUtils.findRootEnclosingType(e); } else { processedType = ElementUtils.findNearestEnclosingType(e); } processElement(generator, processedType, false); } } } } finally { ProcessorContext.setThreadLocalInstance(null); } }