Record Class ScalaMethodData
java.lang.Object
java.lang.Record
io.micronaut.scala.processing.visitor.ScalaMethodData
- Record Components:
name- The method namereturnType- The return typeparameters- The parameterstypeParameters- The declared generic placeholdersthrownTypes- The declared thrown typesannotations- The annotationsmodifiers- The modifiersconstructor- Whether this represents a constructornativeType- The native Scala compiler objectoverriddenMethods- The declarations this method overrides, least specific firstgenericReturnType- The return type with the declaring type's variables bound, ornullwhen it is the declared one
- All Implemented Interfaces:
ScalaAnnotatedElementData
public record ScalaMethodData(String name, ScalaTypeData returnType, List<ScalaParameterData> parameters, List<ScalaTypeData> typeParameters, List<ScalaTypeData> thrownTypes, List<ScalaAnnotationData> annotations, Set<io.micronaut.inject.ast.ElementModifier> modifiers, boolean constructor, Object nativeType, List<ScalaMethodData> overriddenMethods, @Nullable ScalaTypeData genericReturnType)
extends Record
implements ScalaAnnotatedElementData
A Scala method or constructor.
-
Constructor Summary
ConstructorsConstructorDescriptionScalaMethodData(String name, ScalaTypeData returnType, List<ScalaParameterData> parameters, List<ScalaTypeData> typeParameters, List<ScalaTypeData> thrownTypes, List<ScalaAnnotationData> annotations, Set<io.micronaut.inject.ast.ElementModifier> modifiers, boolean constructor, Object nativeType) A method without the declarations it overrides, for the overridden ones themselves.ScalaMethodData(String name, ScalaTypeData returnType, List<ScalaParameterData> parameters, List<ScalaTypeData> typeParameters, List<ScalaTypeData> thrownTypes, List<ScalaAnnotationData> annotations, Set<io.micronaut.inject.ast.ElementModifier> modifiers, boolean constructor, Object nativeType, List<ScalaMethodData> overriddenMethods) A method as declared, whose generic return type is its declared one.ScalaMethodData(String name, ScalaTypeData returnType, List<ScalaParameterData> parameters, List<ScalaTypeData> typeParameters, List<ScalaTypeData> thrownTypes, List<ScalaAnnotationData> annotations, Set<io.micronaut.inject.ast.ElementModifier> modifiers, boolean constructor, Object nativeType, List<ScalaMethodData> overriddenMethods, @Nullable ScalaTypeData genericReturnType) Creates an instance of aScalaMethodDatarecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theannotationsrecord component.booleanReturns the value of theconstructorrecord component.booleanA declaration is itself: two are equal only when they are the same object.@Nullable ScalaTypeDataReturns the value of thegenericReturnTyperecord component.inthashCode()Returns a hash code value for this object.Set<io.micronaut.inject.ast.ElementModifier> Returns the value of themodifiersrecord component.name()Returns the value of thenamerecord component.Returns the value of thenativeTyperecord component.Returns the value of theoverriddenMethodsrecord component.Returns the value of theparametersrecord component.The return type with the type variables of the declaring type bound as they were at the point of use:Bookforfindinherited throughRepo[Book, Long].Returns the value of thereturnTyperecord component.Returns the value of thethrownTypesrecord component.final StringtoString()Returns a string representation of this record class.Returns the value of thetypeParametersrecord component.
-
Constructor Details
-
ScalaMethodData
public ScalaMethodData(String name, ScalaTypeData returnType, List<ScalaParameterData> parameters, List<ScalaTypeData> typeParameters, List<ScalaTypeData> thrownTypes, List<ScalaAnnotationData> annotations, Set<io.micronaut.inject.ast.ElementModifier> modifiers, boolean constructor, Object nativeType, List<ScalaMethodData> overriddenMethods) A method as declared, whose generic return type is its declared one.- Parameters:
name- The method namereturnType- The return typeparameters- The parameterstypeParameters- The type parametersthrownTypes- The declared thrown typesannotations- The annotationsmodifiers- The modifiersconstructor- Whether this is a constructornativeType- The native Scala compiler objectoverriddenMethods- The declarations this method overrides
-
ScalaMethodData
public ScalaMethodData(String name, ScalaTypeData returnType, List<ScalaParameterData> parameters, List<ScalaTypeData> typeParameters, List<ScalaTypeData> thrownTypes, List<ScalaAnnotationData> annotations, Set<io.micronaut.inject.ast.ElementModifier> modifiers, boolean constructor, Object nativeType) A method without the declarations it overrides, for the overridden ones themselves.- Parameters:
name- The method namereturnType- The return typeparameters- The parameterstypeParameters- The type parametersthrownTypes- The declared thrown typesannotations- The annotationsmodifiers- The modifiersconstructor- Whether this is a constructornativeType- The native Scala compiler object
-
ScalaMethodData
public ScalaMethodData(String name, ScalaTypeData returnType, List<ScalaParameterData> parameters, List<ScalaTypeData> typeParameters, List<ScalaTypeData> thrownTypes, List<ScalaAnnotationData> annotations, Set<io.micronaut.inject.ast.ElementModifier> modifiers, boolean constructor, Object nativeType, List<ScalaMethodData> overriddenMethods, @Nullable ScalaTypeData genericReturnType) Creates an instance of aScalaMethodDatarecord class.- Parameters:
name- the value for thenamerecord componentreturnType- the value for thereturnTyperecord componentparameters- the value for theparametersrecord componenttypeParameters- the value for thetypeParametersrecord componentthrownTypes- the value for thethrownTypesrecord componentannotations- the value for theannotationsrecord componentmodifiers- the value for themodifiersrecord componentconstructor- the value for theconstructorrecord componentnativeType- the value for thenativeTyperecord componentoverriddenMethods- the value for theoverriddenMethodsrecord componentgenericReturnType- the value for thegenericReturnTyperecord component
-
-
Method Details
-
resolvedReturnType
The return type with the type variables of the declaring type bound as they were at the point of use:Bookforfindinherited throughRepo[Book, Long].returnType()stays the declaredE, which is what the method compiles to and what an override of it has to be declared as.- Returns:
- The generic return type
-
equals
A declaration is itself: two are equal only when they are the same object. Record equality would compare every member, type and annotation beneath, and core keeps these as keys of a hash map -- so every lookup was hashing the whole model of the class. -
hashCode
-
toString
-
name
Returns the value of thenamerecord component.- Specified by:
namein interfaceScalaAnnotatedElementData- Returns:
- the value of the
namerecord component
-
returnType
Returns the value of thereturnTyperecord component.- Returns:
- the value of the
returnTyperecord component
-
parameters
Returns the value of theparametersrecord component.- Returns:
- the value of the
parametersrecord component
-
typeParameters
Returns the value of thetypeParametersrecord component.- Returns:
- the value of the
typeParametersrecord component
-
thrownTypes
Returns the value of thethrownTypesrecord component.- Returns:
- the value of the
thrownTypesrecord component
-
annotations
Returns the value of theannotationsrecord component.- Specified by:
annotationsin interfaceScalaAnnotatedElementData- Returns:
- the value of the
annotationsrecord component
-
modifiers
-
constructor
public boolean constructor()Returns the value of theconstructorrecord component.- Returns:
- the value of the
constructorrecord component
-
nativeType
Returns the value of thenativeTyperecord component.- Specified by:
nativeTypein interfaceScalaAnnotatedElementData- Returns:
- the value of the
nativeTyperecord component
-
overriddenMethods
Returns the value of theoverriddenMethodsrecord component.- Returns:
- the value of the
overriddenMethodsrecord component
-
genericReturnType
Returns the value of thegenericReturnTyperecord component.- Returns:
- the value of the
genericReturnTyperecord component
-