Class RecordSerdeShapeResolver
java.lang.Object
io.micronaut.serde.processor.sourcegen.records.RecordSerdeShapeResolver
Resolves record shapes eligible for source-generated serdes.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanisConstructorBean(io.micronaut.inject.ast.ClassElement element) Whether a class binds every property through its primary constructor, so that the record generators apply: the constructor takes at least one parameter, every parameter names a bean property of the same type, and every bean property is such a parameter.resolve(io.micronaut.inject.ast.ClassElement element)
-
Constructor Details
-
RecordSerdeShapeResolver
public RecordSerdeShapeResolver()
-
-
Method Details
-
resolve
-
isConstructorBean
public static boolean isConstructorBean(io.micronaut.inject.ast.ClassElement element) Whether a class binds every property through its primary constructor, so that the record generators apply: the constructor takes at least one parameter, every parameter names a bean property of the same type, and every bean property is such a parameter. A property outside the constructor would be written or set by the runtime serdes through other means.- Parameters:
element- The type- Returns:
trueif the type is bound through its constructor like a record
-