Package io.micronaut.inject.visitor
Interface TypeElementVisitor<C,E>
- Type Parameters:
C- The annotation required on the class. UseObjectfor all classes.E- The annotation required on the element. UseObjectfor all elements.
- All Superinterfaces:
Ordered,Toggleable
- All Known Subinterfaces:
ExpressionEvaluationContextRegistrar
- All Known Implementing Classes:
AsyncTypeElementVisitor,BeanImportVisitor,ConfigurationReaderVisitor,ContextConfigurerVisitor,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
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumImplementors of theTypeElementVisitorinterface 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 voidfinish(VisitorContext visitorContext) Called once when visitor processing finishes.default Stringdefault StringCalled once when processor loads.default TypeElementQueryquery()The query which allows to reduce the scope which the visitor is visiting.default voidstart(VisitorContext visitorContext) Called once when visitor processing starts.default voidvisitClass(ClassElement element, VisitorContext context) Executed when a class is encountered that matches the <C> generic.default voidvisitConstructor(ConstructorElement element, VisitorContext context) Executed when a constructor is encountered that matches the <C> generic.default voidvisitEnumConstant(EnumConstantElement element, VisitorContext context) Executed when an enum constant is encountered that matches the <E> generic.default voidvisitField(FieldElement element, VisitorContext context) Executed when a field is encountered that matches the <E> generic.default voidvisitMethod(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
-
query
The query which allows to reduce the scope which the visitor is visiting.- Returns:
- The query if the visitor.
- Since:
- 4.9
-
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.
-