Record Class ScalaPropertyData
java.lang.Object
java.lang.Record
io.micronaut.scala.processing.visitor.ScalaPropertyData
- Record Components:
name- The property nametype- The property typereadMethod- The read methodwriteMethod- The write methodfield- The backing fieldannotations- The annotationsmodifiers- The modifiersnativeType- The native Scala compiler object
- All Implemented Interfaces:
ScalaAnnotatedElementData
public record ScalaPropertyData(String name, ScalaTypeData type, ScalaMethodData readMethod, ScalaMethodData writeMethod, ScalaFieldData field, List<ScalaAnnotationData> annotations, Set<io.micronaut.inject.ast.ElementModifier> modifiers, Object nativeType)
extends Record
implements ScalaAnnotatedElementData
A Scala property backed by an accessor method and, optionally, a setter and field.
-
Constructor Summary
ConstructorsConstructorDescriptionScalaPropertyData(String name, ScalaTypeData type, ScalaMethodData readMethod, ScalaMethodData writeMethod, ScalaFieldData field, List<ScalaAnnotationData> annotations, Set<io.micronaut.inject.ast.ElementModifier> modifiers, Object nativeType) Creates an instance of aScalaPropertyDatarecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theannotationsrecord component.booleanA declaration is itself: two are equal only when they are the same object.field()Returns the value of thefieldrecord 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 thereadMethodrecord component.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.Returns the value of thewriteMethodrecord component.
-
Constructor Details
-
ScalaPropertyData
public ScalaPropertyData(String name, ScalaTypeData type, ScalaMethodData readMethod, ScalaMethodData writeMethod, ScalaFieldData field, List<ScalaAnnotationData> annotations, Set<io.micronaut.inject.ast.ElementModifier> modifiers, Object nativeType) Creates an instance of aScalaPropertyDatarecord class.- Parameters:
name- the value for thenamerecord componenttype- the value for thetyperecord componentreadMethod- the value for thereadMethodrecord componentwriteMethod- the value for thewriteMethodrecord componentfield- the value for thefieldrecord componentannotations- the value for theannotationsrecord componentmodifiers- the value for themodifiersrecord componentnativeType- the value for thenativeTyperecord component
-
-
Method Details
-
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
-
readMethod
Returns the value of thereadMethodrecord component.- Returns:
- the value of the
readMethodrecord component
-
writeMethod
Returns the value of thewriteMethodrecord component.- Returns:
- the value of the
writeMethodrecord component
-
field
-
annotations
Returns the value of theannotationsrecord component.- Specified by:
annotationsin interfaceScalaAnnotatedElementData- Returns:
- the value of the
annotationsrecord component
-
modifiers
-
nativeType
Returns the value of thenativeTyperecord component.- Specified by:
nativeTypein interfaceScalaAnnotatedElementData- Returns:
- the value of the
nativeTyperecord component
-