Record Class AstTypeResolver.ClassGenericInfo

java.lang.Object
java.lang.Record
cs1302.tracer.trace.AstTypeResolver.ClassGenericInfo
Record Components:
classFqn - Fully qualified class name.
typeParameters - List of generic type parameter names.
fieldTypes - Map of field names to declared type strings.
fieldIsFinal - Map of field names to final modifiers.
implementedTypes - List of implemented interface type strings.
extendedType - Optional extended superclass type string.
Enclosing class:
AstTypeResolver

public static record AstTypeResolver.ClassGenericInfo(String classFqn, List<String> typeParameters, Map<String,String> fieldTypes, Map<String,Boolean> fieldIsFinal, List<String> implementedTypes, Optional<String> extendedType) extends Record
Metadata for a class's generic type parameters, fields, and constructors.
  • Constructor Details

    • ClassGenericInfo

      public ClassGenericInfo(String classFqn, List<String> typeParameters, Map<String,String> fieldTypes, Map<String,Boolean> fieldIsFinal)
      Backward-compatible 4-argument constructor.
      Parameters:
      classFqn - Fully qualified class name.
      typeParameters - List of generic type parameter names.
      fieldTypes - Map of field names to declared type strings.
      fieldIsFinal - Map of field names to final modifiers.
    • ClassGenericInfo

      public ClassGenericInfo(String classFqn, List<String> typeParameters, Map<String,String> fieldTypes, Map<String,Boolean> fieldIsFinal, List<String> implementedTypes, Optional<String> extendedType)
      Creates an instance of a ClassGenericInfo record class.
      Parameters:
      classFqn - the value for the classFqn record component
      typeParameters - the value for the typeParameters record component
      fieldTypes - the value for the fieldTypes record component
      fieldIsFinal - the value for the fieldIsFinal record component
      implementedTypes - the value for the implementedTypes record component
      extendedType - the value for the extendedType record component
  • Method Details

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

      public final 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
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • classFqn

      public String classFqn()
      Returns the value of the classFqn record component.
      Returns:
      the value of the classFqn record component
    • typeParameters

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

      public Map<String,String> fieldTypes()
      Returns the value of the fieldTypes record component.
      Returns:
      the value of the fieldTypes record component
    • fieldIsFinal

      public Map<String,Boolean> fieldIsFinal()
      Returns the value of the fieldIsFinal record component.
      Returns:
      the value of the fieldIsFinal record component
    • implementedTypes

      public List<String> implementedTypes()
      Returns the value of the implementedTypes record component.
      Returns:
      the value of the implementedTypes record component
    • extendedType

      public Optional<String> extendedType()
      Returns the value of the extendedType record component.
      Returns:
      the value of the extendedType record component