Record Class SubtypeInfo
java.lang.Object
java.lang.Record
io.micronaut.serde.support.util.SubtypeInfo
- Record Components:
subtypes- The subtypesdiscriminatorType- The discriminator typediscriminatorName- The discriminator namedefaultImpl- The default impldiscriminatorVisible- The discriminator visiblededuct- The deduct subtype
@Internal
public record SubtypeInfo(@NonNull Map<Class<?>,String[]> subtypes, @NonNull SerdeConfig.SerSubtyped.DiscriminatorType discriminatorType, @NonNull String discriminatorName, @Nullable Class<?> defaultImpl, boolean discriminatorVisible, boolean deduct)
extends Record
The subtype info.
- Author:
- Denis Stepanov
-
Constructor Summary
ConstructorsConstructorDescriptionSubtypeInfo(@NonNull Map<Class<?>, String[]> subtypes, @NonNull SerdeConfig.SerSubtyped.DiscriminatorType discriminatorType, @NonNull String discriminatorName, @Nullable Class<?> defaultImpl, boolean discriminatorVisible, boolean deduct) Creates an instance of aSubtypeInforecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic SubtypeInfocreateForProperty(io.micronaut.core.annotation.AnnotationMetadata annotationMetadata) static SubtypeInfocreateForType(io.micronaut.core.annotation.AnnotationMetadata annotationMetadata) booleandeduct()Returns the value of thedeductrecord component.@Nullable Class<?> Returns the value of thedefaultImplrecord component.@NonNull StringReturns the value of thediscriminatorNamerecord component.Returns the value of thediscriminatorTyperecord component.booleanReturns the value of thediscriminatorVisiblerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.subtypes()Returns the value of thesubtypesrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
SubtypeInfo
public SubtypeInfo(@NonNull Map<Class<?>, String[]> subtypes, @NonNull SerdeConfig.SerSubtyped.DiscriminatorType discriminatorType, @NonNull String discriminatorName, @Nullable Class<?> defaultImpl, boolean discriminatorVisible, boolean deduct) Creates an instance of aSubtypeInforecord class.- Parameters:
subtypes- the value for thesubtypesrecord componentdiscriminatorType- the value for thediscriminatorTyperecord componentdiscriminatorName- the value for thediscriminatorNamerecord componentdefaultImpl- the value for thedefaultImplrecord componentdiscriminatorVisible- the value for thediscriminatorVisiblerecord componentdeduct- the value for thedeductrecord component
-
-
Method Details
-
createForProperty
public static SubtypeInfo createForProperty(io.micronaut.core.annotation.AnnotationMetadata annotationMetadata) -
createForType
public static SubtypeInfo createForType(io.micronaut.core.annotation.AnnotationMetadata annotationMetadata) -
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
subtypes
-
discriminatorType
Returns the value of thediscriminatorTyperecord component.- Returns:
- the value of the
discriminatorTyperecord component
-
discriminatorName
Returns the value of thediscriminatorNamerecord component.- Returns:
- the value of the
discriminatorNamerecord component
-
defaultImpl
Returns the value of thedefaultImplrecord component.- Returns:
- the value of the
defaultImplrecord component
-
discriminatorVisible
public boolean discriminatorVisible()Returns the value of thediscriminatorVisiblerecord component.- Returns:
- the value of the
discriminatorVisiblerecord component
-
deduct
-