Record Class SubtypeInfo

java.lang.Object
java.lang.Record
io.micronaut.serde.support.util.SubtypeInfo
Record Components:
subtypes - The subtypes
discriminatorType - The discriminator type
discriminatorName - The discriminator name
defaultImpl - The default impl
discriminatorVisible - The discriminator visible
deduct - 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 Details

  • 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

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • subtypes

      public @NonNull Map<Class<?>,String[]> subtypes()
      Returns the value of the subtypes record component.
      Returns:
      the value of the subtypes record component
    • discriminatorType

      public @NonNull SerdeConfig.SerSubtyped.DiscriminatorType discriminatorType()
      Returns the value of the discriminatorType record component.
      Returns:
      the value of the discriminatorType record component
    • discriminatorName

      public @NonNull String discriminatorName()
      Returns the value of the discriminatorName record component.
      Returns:
      the value of the discriminatorName record component
    • defaultImpl

      public @Nullable Class<?> defaultImpl()
      Returns the value of the defaultImpl record component.
      Returns:
      the value of the defaultImpl record component
    • discriminatorVisible

      public boolean discriminatorVisible()
      Returns the value of the discriminatorVisible record component.
      Returns:
      the value of the discriminatorVisible record component
    • deduct

      public boolean deduct()
      Returns the value of the deduct record component.
      Returns:
      the value of the deduct record component