Record Class ScalaClassData
java.lang.Object
java.lang.Record
io.micronaut.scala.processing.visitor.ScalaClassData
- Record Components:
name- The class nameannotations- The annotationsmodifiers- The modifiersannotationType- Whether this class is an annotation typeinterfaceType- Whether this class is an interface or traitenumType- Whether this class is an enumtypeParameters- The declared generic placeholderssuperType- The super typeinterfaces- The interface typesconstructors- The constructorsmethods- The methodsfields- The fieldsproperties- The propertiesenclosingTypeName- The enclosing type name for inner classesnativeType- The native Scala compiler objectnestedTypeNames- The binary names of the classes declared inside this one, for a class read from the classpath; a source class's are extracted as classes of their own
- All Implemented Interfaces:
ScalaAnnotatedElementData
public record ScalaClassData(String name, List<ScalaAnnotationData> annotations, Set<io.micronaut.inject.ast.ElementModifier> modifiers, boolean annotationType, boolean interfaceType, boolean enumType, List<ScalaTypeData> typeParameters, @Nullable ScalaTypeData superType, List<ScalaTypeData> interfaces, List<ScalaMethodData> constructors, List<ScalaMethodData> methods, List<ScalaFieldData> fields, List<ScalaPropertyData> properties, @Nullable String enclosingTypeName, Object nativeType, List<String> nestedTypeNames)
extends Record
implements ScalaAnnotatedElementData
A Scala class observed by the compiler plugin.
-
Constructor Summary
ConstructorsConstructorDescriptionScalaClassData(String name, List<ScalaAnnotationData> annotations, Set<io.micronaut.inject.ast.ElementModifier> modifiers, boolean annotationType, boolean interfaceType, boolean enumType, List<ScalaTypeData> typeParameters, @Nullable ScalaTypeData superType, List<ScalaTypeData> interfaces, List<ScalaMethodData> constructors, List<ScalaMethodData> methods, List<ScalaFieldData> fields, List<ScalaPropertyData> properties, @Nullable String enclosingTypeName, Object nativeType) A class whose nested types, if any, are found elsewhere -- a source class, whose nested classes are extracted as classes of their own.ScalaClassData(String name, List<ScalaAnnotationData> annotations, Set<io.micronaut.inject.ast.ElementModifier> modifiers, boolean annotationType, boolean interfaceType, boolean enumType, List<ScalaTypeData> typeParameters, @Nullable ScalaTypeData superType, List<ScalaTypeData> interfaces, List<ScalaMethodData> constructors, List<ScalaMethodData> methods, List<ScalaFieldData> fields, List<ScalaPropertyData> properties, @Nullable String enclosingTypeName, Object nativeType, List<String> nestedTypeNames) Creates an instance of aScalaClassDatarecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theannotationsrecord component.booleanReturns the value of theannotationTyperecord component.Returns the value of theconstructorsrecord component.@Nullable StringReturns the value of theenclosingTypeNamerecord component.booleanenumType()Returns the value of theenumTyperecord component.booleanA declaration is itself: two are equal only when they are the same object.fields()Returns the value of thefieldsrecord component.inthashCode()Returns a hash code value for this object.Returns the value of theinterfacesrecord component.booleanReturns the value of theinterfaceTyperecord component.methods()Returns the value of themethodsrecord component.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 thenestedTypeNamesrecord component.Returns the value of thepropertiesrecord component.@Nullable ScalaTypeDataReturns the value of thesuperTyperecord component.final StringtoString()Returns a string representation of this record class.Returns the value of thetypeParametersrecord component.
-
Constructor Details
-
ScalaClassData
public ScalaClassData(String name, List<ScalaAnnotationData> annotations, Set<io.micronaut.inject.ast.ElementModifier> modifiers, boolean annotationType, boolean interfaceType, boolean enumType, List<ScalaTypeData> typeParameters, @Nullable ScalaTypeData superType, List<ScalaTypeData> interfaces, List<ScalaMethodData> constructors, List<ScalaMethodData> methods, List<ScalaFieldData> fields, List<ScalaPropertyData> properties, @Nullable String enclosingTypeName, Object nativeType) A class whose nested types, if any, are found elsewhere -- a source class, whose nested classes are extracted as classes of their own.- Parameters:
name- The class nameannotations- The annotationsmodifiers- The modifiersannotationType- Whether this is an annotation typeinterfaceType- Whether this is an interfaceenumType- Whether this is an enumtypeParameters- The type parameterssuperType- The superclassinterfaces- The interfacesconstructors- The constructorsmethods- The methodsfields- The fieldsproperties- The propertiesenclosingTypeName- The enclosing type name for inner classesnativeType- The native Scala compiler object
-
ScalaClassData
public ScalaClassData(String name, List<ScalaAnnotationData> annotations, Set<io.micronaut.inject.ast.ElementModifier> modifiers, boolean annotationType, boolean interfaceType, boolean enumType, List<ScalaTypeData> typeParameters, @Nullable ScalaTypeData superType, List<ScalaTypeData> interfaces, List<ScalaMethodData> constructors, List<ScalaMethodData> methods, List<ScalaFieldData> fields, List<ScalaPropertyData> properties, @Nullable String enclosingTypeName, Object nativeType, List<String> nestedTypeNames) Creates an instance of aScalaClassDatarecord class.- Parameters:
name- the value for thenamerecord componentannotations- the value for theannotationsrecord componentmodifiers- the value for themodifiersrecord componentannotationType- the value for theannotationTyperecord componentinterfaceType- the value for theinterfaceTyperecord componentenumType- the value for theenumTyperecord componenttypeParameters- the value for thetypeParametersrecord componentsuperType- the value for thesuperTyperecord componentinterfaces- the value for theinterfacesrecord componentconstructors- the value for theconstructorsrecord componentmethods- the value for themethodsrecord componentfields- the value for thefieldsrecord componentproperties- the value for thepropertiesrecord componentenclosingTypeName- the value for theenclosingTypeNamerecord componentnativeType- the value for thenativeTyperecord componentnestedTypeNames- the value for thenestedTypeNamesrecord 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
-
annotations
Returns the value of theannotationsrecord component.- Specified by:
annotationsin interfaceScalaAnnotatedElementData- Returns:
- the value of the
annotationsrecord component
-
modifiers
-
annotationType
public boolean annotationType()Returns the value of theannotationTyperecord component.- Returns:
- the value of the
annotationTyperecord component
-
interfaceType
public boolean interfaceType()Returns the value of theinterfaceTyperecord component.- Returns:
- the value of the
interfaceTyperecord component
-
enumType
-
typeParameters
Returns the value of thetypeParametersrecord component.- Returns:
- the value of the
typeParametersrecord component
-
superType
-
interfaces
Returns the value of theinterfacesrecord component.- Returns:
- the value of the
interfacesrecord component
-
constructors
Returns the value of theconstructorsrecord component.- Returns:
- the value of the
constructorsrecord component
-
methods
-
fields
-
properties
Returns the value of thepropertiesrecord component.- Returns:
- the value of the
propertiesrecord component
-
enclosingTypeName
Returns the value of theenclosingTypeNamerecord component.- Returns:
- the value of the
enclosingTypeNamerecord component
-
nativeType
Returns the value of thenativeTyperecord component.- Specified by:
nativeTypein interfaceScalaAnnotatedElementData- Returns:
- the value of the
nativeTyperecord component
-
nestedTypeNames
Returns the value of thenestedTypeNamesrecord component.- Returns:
- the value of the
nestedTypeNamesrecord component
-