Record Class OverrideResolver.OverriddenMethod

java.lang.Object
java.lang.Record
io.micronaut.sourcegen.generator.OverrideResolver.OverriddenMethod
Record Components:
parameterTypes - The parameter types
returnType - The return type
typeVariables - The variables the method declares, with the bounds the overridden method declares them with, or null to keep the declared ones
renamedVariables - The new names of the variables of the declared method that are renamed, so that a type argument naming a variable of the declaring type of the same name is not captured
Enclosing class:
OverrideResolver

public static record OverrideResolver.OverriddenMethod(List<TypeDef> parameterTypes, TypeDef returnType, @Nullable List<TypeDef.TypeVariable> typeVariables, Map<String,String> renamedVariables) extends Record
The signature of an overridden generic method with the type arguments of the supertype substituted.
Since:
2.3
  • Constructor Details

    • OverriddenMethod

      public OverriddenMethod(List<TypeDef> parameterTypes, TypeDef returnType)
      Parameters:
      parameterTypes - The parameter types
      returnType - The return type
    • OverriddenMethod

      public OverriddenMethod(List<TypeDef> parameterTypes, TypeDef returnType, @Nullable List<TypeDef.TypeVariable> typeVariables, Map<String,String> renamedVariables)
      Creates an instance of a OverriddenMethod record class.
      Parameters:
      parameterTypes - the value for the parameterTypes record component
      returnType - the value for the returnType record component
      typeVariables - the value for the typeVariables record component
      renamedVariables - the value for the renamedVariables record component
  • Method Details

    • apply

      public MethodDef apply(MethodDef methodDef)
      The declared method with this signature, keeping everything else it declares, so that the body is rendered against the resolved types - and with the variables it declares renamed in the body as well.
      Parameters:
      methodDef - The declared method
      Returns:
      The method
    • 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.
    • parameterTypes

      public List<TypeDef> parameterTypes()
      Returns the value of the parameterTypes record component.
      Returns:
      the value of the parameterTypes record component
    • returnType

      public TypeDef returnType()
      Returns the value of the returnType record component.
      Returns:
      the value of the returnType record component
    • typeVariables

      public @Nullable List<TypeDef.TypeVariable> typeVariables()
      Returns the value of the typeVariables record component.
      Returns:
      the value of the typeVariables record component
    • renamedVariables

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