Package io.micronaut.inject.visitor
Interface TypeElementVisitor<C,E>
- Type Parameters:
C
- The annotation required on the class. UseObject
for all classes.E
- The annotation required on the element. UseObject
for all elements.
- All Superinterfaces:
Ordered
,Toggleable
- All Known Subinterfaces:
ExpressionEvaluationContextRegistrar
- All Known Implementing Classes:
AsyncTypeElementVisitor
,BeanImportVisitor
,ConfigurationReaderVisitor
,ContextConfigurerVisitor
,ContextRegistrar
,ExecutableVisitor
,FilterVisitor
,GraalTypeElementVisitor
,InternalApiTypeElementVisitor
,IntrospectedTypeElementVisitor
,MapperVisitor
,RouteValidationVisitor
,WebSocketVisitor
Provides a hook into the compilation process to allow user defined functionality to be created at compile time.
- Since:
- 1.0
- Author:
- James Kleeh
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic enum
Implementors of theTypeElementVisitor
interface should specify what kind of visitor it is. -
Field Summary
Fields inherited from interface io.micronaut.core.order.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
finish
(VisitorContext visitorContext) Called once when visitor processing finishes.default String
default String
Called once when processor loads.default void
start
(VisitorContext visitorContext) Called once when visitor processing starts.default void
visitClass
(ClassElement element, VisitorContext context) Executed when a class is encountered that matches the <C> generic.default void
visitConstructor
(ConstructorElement element, VisitorContext context) Executed when a constructor is encountered that matches the <C> generic.default void
visitEnumConstant
(EnumConstantElement element, VisitorContext context) Executed when an enum constant is encountered that matches the <E> generic.default void
visitField
(FieldElement element, VisitorContext context) Executed when a field is encountered that matches the <E> generic.default void
visitMethod
(MethodElement element, VisitorContext context) Executed when a method is encountered that matches the <E> generic.Methods inherited from interface io.micronaut.core.util.Toggleable
isEnabled
-
Method Details
-
visitClass
Executed when a class is encountered that matches the <C> generic.- Parameters:
element
- The elementcontext
- The visitor context
-
visitMethod
Executed when a method is encountered that matches the <E> generic.- Parameters:
element
- The elementcontext
- The visitor context
-
visitConstructor
Executed when a constructor is encountered that matches the <C> generic.- Parameters:
element
- The elementcontext
- The visitor context
-
visitField
Executed when a field is encountered that matches the <E> generic.- Parameters:
element
- The elementcontext
- The visitor context
-
visitEnumConstant
Executed when an enum constant is encountered that matches the <E> generic.- Parameters:
element
- The elementcontext
- The visitor context- Since:
- 3.6.0
-
start
Called once when visitor processing starts.- Parameters:
visitorContext
- The visitor context
-
finish
Called once when visitor processing finishes.- Parameters:
visitorContext
- The visitor context
-
getSupportedAnnotationNames
- Returns:
- The supported default annotation names.
-
getClassType
-
getElementType
-
getSupportedOptions
Called once when processor loads. Used to expose visitors custom processor options.- Returns:
- Set with custom options
-
getVisitorKind
- Returns:
- The visitor kind.
-