Record Class ScalaParameterData

java.lang.Object
java.lang.Record
io.micronaut.scala.processing.visitor.ScalaParameterData
Record Components:
name - The parameter name
type - The parameter type
annotations - The annotations
defaultAccessor - The name of the generated accessor supplying this parameter's default value, or null when it has no default or the accessor cannot be reached from the call site
defaultAccessorStatic - Whether that accessor is a static method of the declaring class rather than an instance method
nativeType - The native Scala compiler object
overriddenParameters - The same-index parameters of the methods this one's method overrides, least specific first
genericType - The type with the declaring type's variables bound, or null when 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 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 name
      type - The type
      annotations - The annotations
      defaultAccessor - The default-value accessor, if any
      defaultAccessorStatic - Whether that accessor is static
      nativeType - The native Scala compiler object
      overriddenParameters - 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 a ScalaParameterData record class.
      Parameters:
      name - the value for the name record component
      type - the value for the type record component
      annotations - the value for the annotations record component
      defaultAccessor - the value for the defaultAccessor record component
      defaultAccessorStatic - the value for the defaultAccessorStatic record component
      nativeType - the value for the nativeType record component
      overriddenParameters - the value for the overriddenParameters record component
      genericType - the value for the genericType record 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 name
      type - The type
      annotations - The annotations
      defaultAccessor - The default-value accessor, if any
      defaultAccessorStatic - Whether that accessor is static
      nativeType - The native Scala compiler object
    • ScalaParameterData

      public ScalaParameterData(String name, ScalaTypeData type, List<ScalaAnnotationData> annotations, Object nativeType)
  • Method Details

    • resolvedType

      public ScalaTypeData 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

      public boolean equals(Object other)
      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.
      Specified by:
      equals in class Record
    • hashCode

      public 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
    • 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
    • name

      public String name()
      Returns the value of the name record component.
      Specified by:
      name in interface ScalaAnnotatedElementData
      Returns:
      the value of the name record component
    • type

      public ScalaTypeData type()
      Returns the value of the type record component.
      Returns:
      the value of the type record component
    • annotations

      public List<ScalaAnnotationData> annotations()
      Returns the value of the annotations record component.
      Specified by:
      annotations in interface ScalaAnnotatedElementData
      Returns:
      the value of the annotations record component
    • defaultAccessor

      public @Nullable String defaultAccessor()
      Returns the value of the defaultAccessor record component.
      Returns:
      the value of the defaultAccessor record component
    • defaultAccessorStatic

      public boolean defaultAccessorStatic()
      Returns the value of the defaultAccessorStatic record component.
      Returns:
      the value of the defaultAccessorStatic record component
    • nativeType

      public Object nativeType()
      Returns the value of the nativeType record component.
      Specified by:
      nativeType in interface ScalaAnnotatedElementData
      Returns:
      the value of the nativeType record component
    • overriddenParameters

      public List<ScalaParameterData> overriddenParameters()
      Returns the value of the overriddenParameters record component.
      Returns:
      the value of the overriddenParameters record component
    • genericType

      public @Nullable ScalaTypeData genericType()
      Returns the value of the genericType record component.
      Returns:
      the value of the genericType record component