Record Class ScalaParameterData
java.lang.Object
java.lang.Record
io.micronaut.scala.processing.visitor.ScalaParameterData
- Record Components:
name- The parameter nametype- The parameter typeannotations- The annotationsdefaultAccessor- The name of the generated accessor supplying this parameter's default value, ornullwhen it has no default or the accessor cannot be reached from the call sitedefaultAccessorStatic- Whether that accessor is a static method of the declaring class rather than an instance methodnativeType- The native Scala compiler objectoverriddenParameters- The same-index parameters of the methods this one's method overrides, least specific firstgenericType- The type with the declaring type's variables bound, ornullwhen it is the declared one
- All Implemented Interfaces:
ScalaAnnotatedElementData
public record ScalaParameterData(String name, ScalaTypeData type, List<ScalaAnnotationData> annotations, @Nullable String defaultAccessor, boolean defaultAccessorStatic, Object nativeType, List<ScalaParameterData> overriddenParameters, @Nullable ScalaTypeData genericType)
extends Record
implements ScalaAnnotatedElementData
A Scala method or constructor parameter.
-
Constructor Summary
ConstructorsConstructorDescriptionScalaParameterData(String name, ScalaTypeData type, List<ScalaAnnotationData> annotations, @Nullable String defaultAccessor, boolean defaultAccessorStatic, Object nativeType) A parameter without the ones it overrides, for the overridden parameters themselves.ScalaParameterData(String name, ScalaTypeData type, List<ScalaAnnotationData> annotations, @Nullable String defaultAccessor, boolean defaultAccessorStatic, Object nativeType, List<ScalaParameterData> overriddenParameters) A parameter as declared, whose generic type is its declared one.ScalaParameterData(String name, ScalaTypeData type, List<ScalaAnnotationData> annotations, @Nullable String defaultAccessor, boolean defaultAccessorStatic, Object nativeType, List<ScalaParameterData> overriddenParameters, @Nullable ScalaTypeData genericType) Creates an instance of aScalaParameterDatarecord class.ScalaParameterData(String name, ScalaTypeData type, List<ScalaAnnotationData> annotations, Object nativeType) -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theannotationsrecord component.@Nullable StringReturns the value of thedefaultAccessorrecord component.booleanReturns the value of thedefaultAccessorStaticrecord component.booleanA declaration is itself: two are equal only when they are the same object.@Nullable ScalaTypeDataReturns the value of thegenericTyperecord component.inthashCode()Returns a hash code value for this object.name()Returns the value of thenamerecord component.Returns the value of thenativeTyperecord component.Returns the value of theoverriddenParametersrecord component.The type with the declaring type's variables bound as they were at the point of use;type()stays the declared one, which is what the parameter compiles to.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.
-
Constructor Details
-
ScalaParameterData
public ScalaParameterData(String name, ScalaTypeData type, List<ScalaAnnotationData> annotations, @Nullable String defaultAccessor, boolean defaultAccessorStatic, Object nativeType, List<ScalaParameterData> overriddenParameters) A parameter as declared, whose generic type is its declared one.- Parameters:
name- The nametype- The typeannotations- The annotationsdefaultAccessor- The default-value accessor, if anydefaultAccessorStatic- Whether that accessor is staticnativeType- The native Scala compiler objectoverriddenParameters- The same-index parameters of the overridden declarations
-
ScalaParameterData
public ScalaParameterData(String name, ScalaTypeData type, List<ScalaAnnotationData> annotations, @Nullable String defaultAccessor, boolean defaultAccessorStatic, Object nativeType, List<ScalaParameterData> overriddenParameters, @Nullable ScalaTypeData genericType) Creates an instance of aScalaParameterDatarecord class.- Parameters:
name- the value for thenamerecord componenttype- the value for thetyperecord componentannotations- the value for theannotationsrecord componentdefaultAccessor- the value for thedefaultAccessorrecord componentdefaultAccessorStatic- the value for thedefaultAccessorStaticrecord componentnativeType- the value for thenativeTyperecord componentoverriddenParameters- the value for theoverriddenParametersrecord componentgenericType- the value for thegenericTyperecord component
-
ScalaParameterData
public ScalaParameterData(String name, ScalaTypeData type, List<ScalaAnnotationData> annotations, @Nullable String defaultAccessor, boolean defaultAccessorStatic, Object nativeType) A parameter without the ones it overrides, for the overridden parameters themselves.- Parameters:
name- The nametype- The typeannotations- The annotationsdefaultAccessor- The default-value accessor, if anydefaultAccessorStatic- Whether that accessor is staticnativeType- The native Scala compiler object
-
ScalaParameterData
public ScalaParameterData(String name, ScalaTypeData type, List<ScalaAnnotationData> annotations, Object nativeType)
-
-
Method Details
-
resolvedType
The type with the declaring type's variables bound as they were at the point of use;type()stays the declared one, which is what the parameter compiles to.- Returns:
- The generic 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
-
type
-
annotations
Returns the value of theannotationsrecord component.- Specified by:
annotationsin interfaceScalaAnnotatedElementData- Returns:
- the value of the
annotationsrecord component
-
defaultAccessor
Returns the value of thedefaultAccessorrecord component.- Returns:
- the value of the
defaultAccessorrecord component
-
defaultAccessorStatic
public boolean defaultAccessorStatic()Returns the value of thedefaultAccessorStaticrecord component.- Returns:
- the value of the
defaultAccessorStaticrecord component
-
nativeType
Returns the value of thenativeTyperecord component.- Specified by:
nativeTypein interfaceScalaAnnotatedElementData- Returns:
- the value of the
nativeTyperecord component
-
overriddenParameters
Returns the value of theoverriddenParametersrecord component.- Returns:
- the value of the
overriddenParametersrecord component
-
genericType
Returns the value of thegenericTyperecord component.- Returns:
- the value of the
genericTyperecord component
-