Class MyBatisMapperScanVisitor
java.lang.Object
io.micronaut.configuration.mybatis.processor.MyBatisMapperScanVisitor
- All Implemented Interfaces:
io.micronaut.core.order.Ordered, io.micronaut.core.util.Toggleable, io.micronaut.inject.visitor.TypeElementVisitor<Object,Object>
@Internal
public final class MyBatisMapperScanVisitor
extends Object
implements io.micronaut.inject.visitor.TypeElementVisitor<Object,Object>
Generates a
MyBatisMapperScanRegistration for every type annotated with MyBatisMapperScan.
The visitor deliberately visits every class (the default "*" of
TypeElementVisitor.getSupportedAnnotationNames()) because it has to see the mapper interfaces, which carry no
annotation, in addition to the annotated types. Only interfaces compiled in the same compilation
unit can be discovered by package; for packages without any discovered interface a warning is
emitted and the generated registration falls back to MyBatis runtime scanning.
The GraalVM native image metadata of the mappers is handled by MyBatisMapperScanReflectionVisitor.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.micronaut.inject.visitor.TypeElementVisitor
io.micronaut.inject.visitor.TypeElementVisitor.VisitorKind -
Field Summary
Fields inherited from interface io.micronaut.core.order.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidfinish(io.micronaut.inject.visitor.VisitorContext context) io.micronaut.inject.visitor.TypeElementVisitor.VisitorKindvoidvisitClass(io.micronaut.inject.ast.ClassElement element, io.micronaut.inject.visitor.VisitorContext context) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.micronaut.core.order.Ordered
getOrderMethods inherited from interface io.micronaut.core.util.Toggleable
isEnabledMethods inherited from interface io.micronaut.inject.visitor.TypeElementVisitor
getClassType, getElementType, getSupportedAnnotationNames, getSupportedOptions, query, start, visitConstructor, visitEnumConstant, visitField, visitMethod
-
Constructor Details
-
MyBatisMapperScanVisitor
public MyBatisMapperScanVisitor()
-
-
Method Details
-
getVisitorKind
-
visitClass
-
finish
-