Record Class OverrideResolver.OverriddenMethod
java.lang.Object
java.lang.Record
io.micronaut.sourcegen.generator.OverrideResolver.OverriddenMethod
- Record Components:
parameterTypes- The parameter typesreturnType- The return typetypeVariables- The variables the method declares, with the bounds the overridden method declares them with, ornullto keep the declared onesrenamedVariables- 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 Summary
ConstructorsConstructorDescriptionOverriddenMethod(List<TypeDef> parameterTypes, TypeDef returnType) OverriddenMethod(List<TypeDef> parameterTypes, TypeDef returnType, @Nullable List<TypeDef.TypeVariable> typeVariables, Map<String, String> renamedVariables) Creates an instance of aOverriddenMethodrecord class. -
Method Summary
Modifier and TypeMethodDescriptionThe 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.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theparameterTypesrecord component.Returns the value of therenamedVariablesrecord component.Returns the value of thereturnTyperecord component.final StringtoString()Returns a string representation of this record class.@Nullable List<TypeDef.TypeVariable> Returns the value of thetypeVariablesrecord component.
-
Constructor Details
-
OverriddenMethod
-
OverriddenMethod
public OverriddenMethod(List<TypeDef> parameterTypes, TypeDef returnType, @Nullable List<TypeDef.TypeVariable> typeVariables, Map<String, String> renamedVariables) Creates an instance of aOverriddenMethodrecord class.- Parameters:
parameterTypes- the value for theparameterTypesrecord componentreturnType- the value for thereturnTyperecord componenttypeVariables- the value for thetypeVariablesrecord componentrenamedVariables- the value for therenamedVariablesrecord component
-
-
Method Details
-
apply
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
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
parameterTypes
Returns the value of theparameterTypesrecord component.- Returns:
- the value of the
parameterTypesrecord component
-
returnType
Returns the value of thereturnTyperecord component.- Returns:
- the value of the
returnTyperecord component
-
typeVariables
Returns the value of thetypeVariablesrecord component.- Returns:
- the value of the
typeVariablesrecord component
-
renamedVariables
Returns the value of therenamedVariablesrecord component.- Returns:
- the value of the
renamedVariablesrecord component
-