Record Class RecordSerdeShape.RecordComponent

java.lang.Object
java.lang.Record
io.micronaut.serde.processor.sourcegen.records.RecordSerdeShape.RecordComponent
Record Components:
name - The component name.
type - The component type.
propertyElement - The associated bean property element.
Enclosing class:
RecordSerdeShape

public static record RecordSerdeShape.RecordComponent(String name, io.micronaut.inject.ast.ClassElement type, io.micronaut.inject.ast.PropertyElement propertyElement) extends Record
Record component metadata used by source generation.
  • Constructor Summary

    Constructors
    Constructor
    Description
    RecordComponent(String name, io.micronaut.inject.ast.ClassElement type, io.micronaut.inject.ast.PropertyElement propertyElement)
    Creates an instance of a RecordComponent record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    Returns the value of the name record component.
    io.micronaut.inject.ast.PropertyElement
    Returns the value of the propertyElement record component.
    final String
    Returns a string representation of this record class.
    io.micronaut.inject.ast.ClassElement
    Returns the value of the type record component.

    Methods inherited from class Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • RecordComponent

      public RecordComponent(String name, io.micronaut.inject.ast.ClassElement type, io.micronaut.inject.ast.PropertyElement propertyElement)
      Creates an instance of a RecordComponent record class.
      Parameters:
      name - the value for the name record component
      type - the value for the type record component
      propertyElement - the value for the propertyElement record component
  • Method Details

    • 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. All components in this record class are compared with Objects::equals(Object,Object).
      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.
    • name

      public String name()
      Returns the value of the name record component.
      Returns:
      the value of the name record component
    • type

      public io.micronaut.inject.ast.ClassElement type()
      Returns the value of the type record component.
      Returns:
      the value of the type record component
    • propertyElement

      public io.micronaut.inject.ast.PropertyElement propertyElement()
      Returns the value of the propertyElement record component.
      Returns:
      the value of the propertyElement record component