Record Class SerdeSourceGenGetterMethods.GetterMethod

java.lang.Object
java.lang.Record
io.micronaut.serde.processor.sourcegen.SerdeSourceGenGetterMethods.GetterMethod
Record Components:
originalName - The name derived from the method name, which a property order can refer to
serializedName - The name the value is written under
method - The method returning the value
type - The return type of the method
keyMetadata - Pre-resolved metadata contributed with the key
include - The inclusion resolved at build time, or null when the configuration decides
Enclosing class:
SerdeSourceGenGetterMethods

public static record SerdeSourceGenGetterMethods.GetterMethod(String originalName, String serializedName, io.micronaut.inject.ast.MethodElement method, io.micronaut.inject.ast.ClassElement type, Map<String,String> keyMetadata, @Nullable SerdeConfig.SerInclude include) extends Record
A getter method the generated serializer writes.
Since:
3.2
  • Constructor Details

    • GetterMethod

      public GetterMethod(String originalName, String serializedName, io.micronaut.inject.ast.MethodElement method, io.micronaut.inject.ast.ClassElement type, Map<String,String> keyMetadata, @Nullable SerdeConfig.SerInclude include)
      Creates an instance of a GetterMethod record class.
      Parameters:
      originalName - the value for the originalName record component
      serializedName - the value for the serializedName record component
      method - the value for the method record component
      type - the value for the type record component
      keyMetadata - the value for the keyMetadata record component
      include - the value for the include 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.
    • originalName

      public String originalName()
      Returns the value of the originalName record component.
      Returns:
      the value of the originalName record component
    • serializedName

      public String serializedName()
      Returns the value of the serializedName record component.
      Returns:
      the value of the serializedName record component
    • method

      public io.micronaut.inject.ast.MethodElement method()
      Returns the value of the method record component.
      Returns:
      the value of the method 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
    • keyMetadata

      public Map<String,String> keyMetadata()
      Returns the value of the keyMetadata record component.
      Returns:
      the value of the keyMetadata record component
    • include

      public @Nullable SerdeConfig.SerInclude include()
      Returns the value of the include record component.
      Returns:
      the value of the include record component