Record Class ScalaClassData

java.lang.Object
java.lang.Record
io.micronaut.scala.processing.visitor.ScalaClassData
Record Components:
name - The class name
annotations - The annotations
modifiers - The modifiers
annotationType - Whether this class is an annotation type
interfaceType - Whether this class is an interface or trait
enumType - Whether this class is an enum
typeParameters - The declared generic placeholders
superType - The super type
interfaces - The interface types
constructors - The constructors
methods - The methods
fields - The fields
properties - The properties
enclosingTypeName - The enclosing type name for inner classes
nativeType - The native Scala compiler object
nestedTypeNames - 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 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 name
      annotations - The annotations
      modifiers - The modifiers
      annotationType - Whether this is an annotation type
      interfaceType - Whether this is an interface
      enumType - Whether this is an enum
      typeParameters - The type parameters
      superType - The superclass
      interfaces - The interfaces
      constructors - The constructors
      methods - The methods
      fields - The fields
      properties - The properties
      enclosingTypeName - The enclosing type name for inner classes
      nativeType - 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 a ScalaClassData record class.
      Parameters:
      name - the value for the name record component
      annotations - the value for the annotations record component
      modifiers - the value for the modifiers record component
      annotationType - the value for the annotationType record component
      interfaceType - the value for the interfaceType record component
      enumType - the value for the enumType record component
      typeParameters - the value for the typeParameters record component
      superType - the value for the superType record component
      interfaces - the value for the interfaces record component
      constructors - the value for the constructors record component
      methods - the value for the methods record component
      fields - the value for the fields record component
      properties - the value for the properties record component
      enclosingTypeName - the value for the enclosingTypeName record component
      nativeType - the value for the nativeType record component
      nestedTypeNames - the value for the nestedTypeNames record component
  • Method Details

    • 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
    • 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
    • modifiers

      public Set<io.micronaut.inject.ast.ElementModifier> modifiers()
      Returns the value of the modifiers record component.
      Returns:
      the value of the modifiers record component
    • annotationType

      public boolean annotationType()
      Returns the value of the annotationType record component.
      Returns:
      the value of the annotationType record component
    • interfaceType

      public boolean interfaceType()
      Returns the value of the interfaceType record component.
      Returns:
      the value of the interfaceType record component
    • enumType

      public boolean enumType()
      Returns the value of the enumType record component.
      Returns:
      the value of the enumType record component
    • typeParameters

      public List<ScalaTypeData> typeParameters()
      Returns the value of the typeParameters record component.
      Returns:
      the value of the typeParameters record component
    • superType

      public @Nullable ScalaTypeData superType()
      Returns the value of the superType record component.
      Returns:
      the value of the superType record component
    • interfaces

      public List<ScalaTypeData> interfaces()
      Returns the value of the interfaces record component.
      Returns:
      the value of the interfaces record component
    • constructors

      public List<ScalaMethodData> constructors()
      Returns the value of the constructors record component.
      Returns:
      the value of the constructors record component
    • methods

      public List<ScalaMethodData> methods()
      Returns the value of the methods record component.
      Returns:
      the value of the methods record component
    • fields

      public List<ScalaFieldData> fields()
      Returns the value of the fields record component.
      Returns:
      the value of the fields record component
    • properties

      public List<ScalaPropertyData> properties()
      Returns the value of the properties record component.
      Returns:
      the value of the properties record component
    • enclosingTypeName

      public @Nullable String enclosingTypeName()
      Returns the value of the enclosingTypeName record component.
      Returns:
      the value of the enclosingTypeName 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
    • nestedTypeNames

      public List<String> nestedTypeNames()
      Returns the value of the nestedTypeNames record component.
      Returns:
      the value of the nestedTypeNames record component