Class SerdeSourceGenVisitor
java.lang.Object
io.micronaut.serde.processor.sourcegen.SerdeSourceGenVisitor
- All Implemented Interfaces:
io.micronaut.core.order.Ordered, io.micronaut.core.util.Toggleable, io.micronaut.inject.visitor.TypeElementVisitor<Object,Object>
-
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 TypeMethodDescriptionList<io.micronaut.sourcegen.model.ClassDef> generate(io.micronaut.inject.ast.ClassElement element, io.micronaut.inject.visitor.VisitorContext.Language language) Builds the definitions of the serializer and deserializer generated for the given type.intgetOrder()Visitors run from the highest order to the lowest.io.micronaut.inject.visitor.TypeElementVisitor.VisitorKindvoidstart(io.micronaut.inject.visitor.VisitorContext visitorContext) voidvisitClass(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.util.Toggleable
isEnabledMethods inherited from interface io.micronaut.inject.visitor.TypeElementVisitor
finish, getClassType, getElementType, getSupportedOptions, query, visitConstructor, visitEnumConstant, visitField, visitMethod
-
Constructor Details
-
SerdeSourceGenVisitor
public SerdeSourceGenVisitor()
-
-
Method Details
-
getSupportedAnnotationNames
-
start
-
visitClass
-
generate
@Internal public List<io.micronaut.sourcegen.model.ClassDef> generate(io.micronaut.inject.ast.ClassElement element, io.micronaut.inject.visitor.VisitorContext.Language language) Builds the definitions of the serializer and deserializer generated for the given type.- Parameters:
element- The serdeable typelanguage- The language of the generated source- Returns:
- The generated class definitions, empty when both directions use the runtime serdes
-
getOrder
public int getOrder()Visitors run from the highest order to the lowest. The generated serdes have to observe the metadataSerdeAnnotationVisitoradds to the properties, such as names resolved through a naming strategy or properties ignored through a type-level annotation, so this visitor runs after it and before the introspection is written.- Specified by:
getOrderin interfaceio.micronaut.core.order.Ordered
-
getVisitorKind
-