@Internal @SupportedOptions(value={"micronaut.processing.incremental","micronaut.processing.annotations"}) public class BeanDefinitionInjectProcessor extends javax.annotation.processing.AbstractProcessor
The core annotation processor used to generate bean definitions and power AOP for Micronaut.
Each dependency injection candidate is visited and BeanDefinitionWriter
is used to produce byte code via ASM.
Each bean results in a instanceof BeanDefinition
Modifier and Type | Field and Description |
---|---|
protected AnnotationUtils |
annotationUtils |
protected AnnotationProcessingOutputVisitor |
classWriterOutputVisitor |
protected javax.lang.model.util.Elements |
elementUtils |
protected javax.annotation.processing.Filer |
filer |
protected GenericUtils |
genericUtils |
protected static java.lang.String |
GRADLE_PROCESSING_AGGREGATING
Constant for aggregating processor.
|
protected static java.lang.String |
GRADLE_PROCESSING_ISOLATING
Constant for isolating processor.
|
protected JavaVisitorContext |
javaVisitorContext |
protected javax.annotation.processing.Messager |
messager |
protected static java.lang.String |
MICRONAUT_PROCESSING_ANNOTATIONS
Annotation processor option used to add additional annotation patterns to process.
|
protected static java.lang.String |
MICRONAUT_PROCESSING_INCREMENTAL
Annotation processor option used to activate incremental processing.
|
protected ModelUtils |
modelUtils |
protected javax.lang.model.util.Types |
typeUtils |
protected MutableConvertibleValues<java.lang.Object> |
visitorAttributes |
Constructor and Description |
---|
BeanDefinitionInjectProcessor() |
Modifier and Type | Method and Description |
---|---|
protected void |
error(javax.lang.model.element.Element e,
java.lang.String msg,
java.lang.Object... args)
Produce a compile error for the given element and message.
|
protected void |
error(java.lang.String msg,
java.lang.Object... args)
Produce a compile error for the given message.
|
protected java.lang.String |
getIncrementalProcessorType() |
java.util.Set<java.lang.String> |
getSupportedAnnotationTypes() |
java.util.Set<java.lang.String> |
getSupportedOptions() |
javax.lang.model.SourceVersion |
getSupportedSourceVersion() |
void |
init(javax.annotation.processing.ProcessingEnvironment processingEnv) |
protected boolean |
isIncremental(javax.annotation.processing.ProcessingEnvironment processingEnv)
Whether incremental compilation is enabled.
|
protected void |
note(javax.lang.model.element.Element e,
java.lang.String msg,
java.lang.Object... args)
Produce a compile note for the given element and message.
|
protected void |
note(java.lang.String msg,
java.lang.Object... args)
Produce a compile note for the given element and message.
|
boolean |
process(java.util.Set<? extends javax.lang.model.element.TypeElement> annotations,
javax.annotation.processing.RoundEnvironment roundEnv) |
protected void |
warning(javax.lang.model.element.Element e,
java.lang.String msg,
java.lang.Object... args)
Produce a compile warning for the given element and message.
|
protected void |
warning(java.lang.String msg,
java.lang.Object... args)
Produce a compile warning for the given message.
|
protected static final java.lang.String MICRONAUT_PROCESSING_INCREMENTAL
protected static final java.lang.String MICRONAUT_PROCESSING_ANNOTATIONS
protected static final java.lang.String GRADLE_PROCESSING_AGGREGATING
protected static final java.lang.String GRADLE_PROCESSING_ISOLATING
protected javax.annotation.processing.Messager messager
protected javax.annotation.processing.Filer filer
protected javax.lang.model.util.Elements elementUtils
protected javax.lang.model.util.Types typeUtils
protected AnnotationUtils annotationUtils
protected GenericUtils genericUtils
protected ModelUtils modelUtils
protected MutableConvertibleValues<java.lang.Object> visitorAttributes
protected AnnotationProcessingOutputVisitor classWriterOutputVisitor
protected JavaVisitorContext javaVisitorContext
public final void init(javax.annotation.processing.ProcessingEnvironment processingEnv)
init
in interface javax.annotation.processing.Processor
public final boolean process(java.util.Set<? extends javax.lang.model.element.TypeElement> annotations, javax.annotation.processing.RoundEnvironment roundEnv)
process
in interface javax.annotation.processing.Processor
process
in class javax.annotation.processing.AbstractProcessor
public javax.lang.model.SourceVersion getSupportedSourceVersion()
getSupportedSourceVersion
in interface javax.annotation.processing.Processor
getSupportedSourceVersion
in class javax.annotation.processing.AbstractProcessor
public java.util.Set<java.lang.String> getSupportedOptions()
getSupportedOptions
in interface javax.annotation.processing.Processor
getSupportedOptions
in class javax.annotation.processing.AbstractProcessor
protected java.lang.String getIncrementalProcessorType()
GRADLE_PROCESSING_AGGREGATING
,
GRADLE_PROCESSING_ISOLATING
public java.util.Set<java.lang.String> getSupportedAnnotationTypes()
getSupportedAnnotationTypes
in interface javax.annotation.processing.Processor
getSupportedAnnotationTypes
in class javax.annotation.processing.AbstractProcessor
protected final void error(javax.lang.model.element.Element e, java.lang.String msg, java.lang.Object... args)
e
- The elementmsg
- The messageargs
- The string format argsprotected final void error(java.lang.String msg, java.lang.Object... args)
msg
- The messageargs
- The string format argsprotected final void warning(javax.lang.model.element.Element e, java.lang.String msg, java.lang.Object... args)
e
- The elementmsg
- The messageargs
- The string format argsprotected final void warning(java.lang.String msg, java.lang.Object... args)
msg
- The messageargs
- The string format argsprotected final void note(javax.lang.model.element.Element e, java.lang.String msg, java.lang.Object... args)
e
- The elementmsg
- The messageargs
- The string format argsprotected final void note(java.lang.String msg, java.lang.Object... args)
msg
- The messageargs
- The string format argsprotected boolean isIncremental(@NonNull javax.annotation.processing.ProcessingEnvironment processingEnv)
processingEnv
- The processing environment.