Class ConfigurationMetadataProcessor
java.lang.Object
javax.annotation.processing.AbstractProcessor
io.micronaut.annotation.processing.ConfigurationMetadataProcessor
- All Implemented Interfaces:
Processor
Handles Configuration metadata generation.
- Since:
- 3.5.1
- Author:
- graemerocher
-
Field Summary
Modifier and TypeFieldDescriptionprotected AnnotationProcessingOutputVisitor
protected Elements
protected Filer
protected static final String
Constant for aggregating processor.protected static final String
Constant for isolating processor.protected JavaVisitorContext
protected Messager
protected static final String
Annotation processor option used to add additional annotation patterns to process.protected static final String
Annotation processor option used to activate incremental processing.protected ModelUtils
protected Types
protected MutableConvertibleValues<Object>
Fields inherited from class javax.annotation.processing.AbstractProcessor
processingEnv
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected final void
Produce a compile error for the given message.protected final void
Produce a compile error for the given element and message.protected String
protected TypeElementVisitor.VisitorKind
obtains the visitor kind.void
init
(ProcessingEnvironment processingEnv) protected boolean
isIncremental
(@NonNull ProcessingEnvironment processingEnv) Whether incremental compilation is enabled.protected boolean
isProcessedAnnotation
(String annotationName) Return whether the given annotation is processed.protected @NonNull JavaVisitorContext
newVisitorContext
(@NonNull ProcessingEnvironment processingEnv) Creates the visitor context.protected final void
Produce a compile note for the given element and message.protected final void
Produce a compile note for the given element and message.boolean
process
(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) protected final void
Produce a compile warning for the given message.protected final void
Produce a compile warning for the given element and message.Methods inherited from class javax.annotation.processing.AbstractProcessor
getCompletions, isInitialized
-
Field Details
-
MICRONAUT_PROCESSING_INCREMENTAL
Annotation processor option used to activate incremental processing.- See Also:
-
MICRONAUT_PROCESSING_ANNOTATIONS
Annotation processor option used to add additional annotation patterns to process.- See Also:
-
GRADLE_PROCESSING_AGGREGATING
Constant for aggregating processor.- See Also:
-
GRADLE_PROCESSING_ISOLATING
Constant for isolating processor.- See Also:
-
messager
-
filer
-
elementUtils
-
typeUtils
-
modelUtils
-
visitorAttributes
-
classWriterOutputVisitor
-
javaVisitorContext
-
-
Constructor Details
-
ConfigurationMetadataProcessor
public ConfigurationMetadataProcessor()
-
-
Method Details
-
getSupportedAnnotationTypes
- Specified by:
getSupportedAnnotationTypes
in interfaceProcessor
-
getVisitorKind
obtains the visitor kind.- Returns:
- The visitor kind
-
getIncrementalProcessorType
- Returns:
- The incremental processor type.
- See Also:
-
process
- Specified by:
process
in interfaceProcessor
- Specified by:
process
in classAbstractProcessor
-
getSupportedSourceVersion
- Specified by:
getSupportedSourceVersion
in interfaceProcessor
- Overrides:
getSupportedSourceVersion
in classAbstractProcessor
-
getSupportedOptions
- Specified by:
getSupportedOptions
in interfaceProcessor
- Overrides:
getSupportedOptions
in classAbstractProcessor
-
isProcessedAnnotation
Return whether the given annotation is processed.- Parameters:
annotationName
- The annotation name- Returns:
- True if it is
-
init
- Specified by:
init
in interfaceProcessor
- Overrides:
init
in classAbstractProcessor
-
newVisitorContext
@NonNull protected @NonNull JavaVisitorContext newVisitorContext(@NonNull @NonNull ProcessingEnvironment processingEnv) Creates the visitor context.- Parameters:
processingEnv
- The processing env- Returns:
- The context
-
error
Produce a compile error for the given element and message.- Parameters:
e
- The elementmsg
- The messageargs
- The string format args
-
error
Produce a compile error for the given message.- Parameters:
msg
- The messageargs
- The string format args
-
warning
Produce a compile warning for the given element and message.- Parameters:
e
- The elementmsg
- The messageargs
- The string format args
-
warning
Produce a compile warning for the given message.- Parameters:
msg
- The messageargs
- The string format args
-
note
Produce a compile note for the given element and message.- Parameters:
e
- The elementmsg
- The messageargs
- The string format args
-
note
Produce a compile note for the given element and message.- Parameters:
msg
- The messageargs
- The string format args
-
isIncremental
Whether incremental compilation is enabled.- Parameters:
processingEnv
- The processing environment.- Returns:
- True if it is
-