public class ConfigurationMetadataProcessor extends AbstractProcessor
Modifier and Type | Field and Description |
---|---|
protected AnnotationUtils |
annotationUtils |
protected AnnotationProcessingOutputVisitor |
classWriterOutputVisitor |
protected Elements |
elementUtils |
protected Filer |
filer |
protected GenericUtils |
genericUtils |
protected static String |
GRADLE_PROCESSING_AGGREGATING
Constant for aggregating processor.
|
protected static String |
GRADLE_PROCESSING_ISOLATING
Constant for isolating processor.
|
protected JavaVisitorContext |
javaVisitorContext |
protected Messager |
messager |
protected static String |
MICRONAUT_PROCESSING_ANNOTATIONS
Annotation processor option used to add additional annotation patterns to process.
|
protected static String |
MICRONAUT_PROCESSING_INCREMENTAL
Annotation processor option used to activate incremental processing.
|
protected ModelUtils |
modelUtils |
protected Types |
typeUtils |
protected MutableConvertibleValues<Object> |
visitorAttributes |
processingEnv
Constructor and Description |
---|
ConfigurationMetadataProcessor() |
Modifier and Type | Method and Description |
---|---|
protected void |
error(Element e,
String msg,
Object... args)
Produce a compile error for the given element and message.
|
protected void |
error(String msg,
Object... args)
Produce a compile error for the given message.
|
protected String |
getIncrementalProcessorType() |
Set<String> |
getSupportedAnnotationTypes() |
Set<String> |
getSupportedOptions() |
SourceVersion |
getSupportedSourceVersion() |
protected TypeElementVisitor.VisitorKind |
getVisitorKind()
obtains the visitor kind.
|
void |
init(ProcessingEnvironment processingEnv) |
protected boolean |
isIncremental(ProcessingEnvironment processingEnv)
Whether incremental compilation is enabled.
|
protected boolean |
isProcessedAnnotation(String annotationName)
Return whether the given annotation is processed.
|
protected JavaVisitorContext |
newVisitorContext(ProcessingEnvironment processingEnv)
Creates the visitor context.
|
protected void |
note(Element e,
String msg,
Object... args)
Produce a compile note for the given element and message.
|
protected void |
note(String msg,
Object... args)
Produce a compile note for the given element and message.
|
boolean |
process(Set<? extends TypeElement> annotations,
RoundEnvironment roundEnv) |
protected void |
warning(Element e,
String msg,
Object... args)
Produce a compile warning for the given element and message.
|
protected void |
warning(String msg,
Object... args)
Produce a compile warning for the given message.
|
getCompletions, isInitialized
protected static final String MICRONAUT_PROCESSING_INCREMENTAL
protected static final String MICRONAUT_PROCESSING_ANNOTATIONS
protected static final String GRADLE_PROCESSING_AGGREGATING
protected static final String GRADLE_PROCESSING_ISOLATING
protected Messager messager
protected Filer filer
protected Elements elementUtils
protected Types typeUtils
protected AnnotationUtils annotationUtils
protected GenericUtils genericUtils
protected ModelUtils modelUtils
protected MutableConvertibleValues<Object> visitorAttributes
protected AnnotationProcessingOutputVisitor classWriterOutputVisitor
protected JavaVisitorContext javaVisitorContext
public Set<String> getSupportedAnnotationTypes()
getSupportedAnnotationTypes
in interface Processor
protected TypeElementVisitor.VisitorKind getVisitorKind()
protected String getIncrementalProcessorType()
GRADLE_PROCESSING_AGGREGATING
,
GRADLE_PROCESSING_ISOLATING
public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv)
process
in interface Processor
process
in class AbstractProcessor
public SourceVersion getSupportedSourceVersion()
getSupportedSourceVersion
in interface Processor
getSupportedSourceVersion
in class AbstractProcessor
public Set<String> getSupportedOptions()
getSupportedOptions
in interface Processor
getSupportedOptions
in class AbstractProcessor
protected boolean isProcessedAnnotation(String annotationName)
annotationName
- The annotation namepublic void init(ProcessingEnvironment processingEnv)
init
in interface Processor
init
in class AbstractProcessor
@NonNull protected JavaVisitorContext newVisitorContext(@NonNull ProcessingEnvironment processingEnv)
processingEnv
- The processing envprotected final void error(Element e, String msg, Object... args)
e
- The elementmsg
- The messageargs
- The string format argsprotected final void error(String msg, Object... args)
msg
- The messageargs
- The string format argsprotected final void warning(Element e, String msg, Object... args)
e
- The elementmsg
- The messageargs
- The string format argsprotected final void warning(String msg, Object... args)
msg
- The messageargs
- The string format argsprotected final void note(Element e, String msg, Object... args)
e
- The elementmsg
- The messageargs
- The string format argsprotected final void note(String msg, Object... args)
msg
- The messageargs
- The string format argsprotected boolean isIncremental(@NonNull ProcessingEnvironment processingEnv)
processingEnv
- The processing environment.