Package io.micronaut.context.visitor
Class ContextConfigurerVisitor
java.lang.Object
io.micronaut.context.visitor.ContextConfigurerVisitor
- All Implemented Interfaces:
Ordered
,Toggleable
,TypeElementVisitor<ContextConfigurer,
Object>
@Internal
public class ContextConfigurerVisitor
extends Object
implements TypeElementVisitor<ContextConfigurer,Object>
This visitor is responsible for generating service files for classes
annotated with
ContextConfigurer
.- Since:
- 3.2
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.micronaut.inject.visitor.TypeElementVisitor
TypeElementVisitor.VisitorKind
-
Field Summary
Fields inherited from interface io.micronaut.core.order.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
Checks that a class annotated withContextConfigurer
doesn't have any constructor with parameters, which is unsupported.void
visitClass
(ClassElement element, VisitorContext context) Executed when a class is encountered that matches the <C> generic.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.micronaut.core.util.Toggleable
isEnabled
Methods inherited from interface io.micronaut.inject.visitor.TypeElementVisitor
finish, getClassType, getSupportedAnnotationNames, getSupportedOptions, start, visitConstructor, visitEnumConstant, visitField, visitMethod
-
Constructor Details
-
ContextConfigurerVisitor
public ContextConfigurerVisitor()
-
-
Method Details
-
getVisitorKind
- Specified by:
getVisitorKind
in interfaceTypeElementVisitor<ContextConfigurer,
Object> - Returns:
- The visitor kind.
-
getElementType
- Specified by:
getElementType
in interfaceTypeElementVisitor<ContextConfigurer,
Object>
-
visitClass
Description copied from interface:TypeElementVisitor
Executed when a class is encountered that matches the <C> generic.- Specified by:
visitClass
in interfaceTypeElementVisitor<ContextConfigurer,
Object> - Parameters:
element
- The elementcontext
- The visitor context
-
assertNoConstructorForContextAnnotation
Checks that a class annotated withContextConfigurer
doesn't have any constructor with parameters, which is unsupported.- Parameters:
element
- the class to check
-