Class TypeElementVisitorProcessor
java.lang.Object
javax.annotation.processing.AbstractProcessor
io.micronaut.annotation.processing.AbstractInjectAnnotationProcessor
io.micronaut.annotation.processing.TypeElementVisitorProcessor
- All Implemented Interfaces:
Processor
- Direct Known Subclasses:
AggregatingTypeElementVisitorProcessor
@SupportedOptions({"micronaut.processing.incremental","micronaut.processing.annotations","micronaut.processing.project.dir","micronaut.processing.group","micronaut.processing.module"})
public class TypeElementVisitorProcessor
extends AbstractInjectAnnotationProcessor
The annotation processed used to execute type element visitors.
- Since:
- 1.0
- Author:
- James Kleeh, graemerocher
-
Field Summary
Fields inherited from class AbstractInjectAnnotationProcessor
classWriterOutputVisitor, elementUtils, filer, GRADLE_PROCESSING_AGGREGATING, GRADLE_PROCESSING_ISOLATING, javaVisitorContext, messager, MICRONAUT_PROCESSING_ANNOTATIONS, MICRONAUT_PROCESSING_INCREMENTAL, modelUtils, postponedTypes, typeUtils, visitorAttributesFields inherited from class AbstractProcessor
processingEnv -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Collection<? extends TypeElementVisitor<?, ?>> Discovers theTypeElementVisitorinstances that are available.protected TypeElementVisitor.VisitorKindprotected List<io.micronaut.annotation.processing.LoadedVisitor> protected booleanDoes this process have any visitors.voidinit(ProcessingEnvironment processingEnv) booleanprocess(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) Methods inherited from class AbstractInjectAnnotationProcessor
error, error, getIncrementalProcessorType, getSupportedSourceVersion, getVisitorKind, isIncremental, isProcessedAnnotation, newVisitorContext, note, note, processingGeneratedAnnotation, warning, warningMethods inherited from class AbstractProcessor
getCompletions, isInitialized
-
Constructor Details
-
TypeElementVisitorProcessor
public TypeElementVisitorProcessor()
-
-
Method Details
-
init
- Specified by:
initin interfaceProcessor- Overrides:
initin classAbstractInjectAnnotationProcessor
-
hasVisitors
protected boolean hasVisitors()Does this process have any visitors.- Returns:
- True if visitors are present.
-
getLoadedVisitors
- Returns:
- The loaded visitors.
-
getIncrementalProcessorKind
- Returns:
- The incremental processor type.
- See Also:
-
getSupportedAnnotationTypes
- Specified by:
getSupportedAnnotationTypesin interfaceProcessor- Overrides:
getSupportedAnnotationTypesin classAbstractInjectAnnotationProcessor
-
getSupportedOptions
- Specified by:
getSupportedOptionsin interfaceProcessor- Overrides:
getSupportedOptionsin classAbstractInjectAnnotationProcessor
-
process
@NextMajorVersion("`roundEnv.getRootElements()` should be removed in Micronaut 4. It should not be possible to process elements without at least one annotation present and this call breaks that assumption") public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) - Specified by:
processin interfaceProcessor- Specified by:
processin classAbstractProcessor
-
findTypeElementVisitors
Discovers theTypeElementVisitorinstances that are available.- Returns:
- A collection of type element visitors.
-