Record Class Signatures.ClassnameAndDimensions

java.lang.Object
java.lang.Record
org.plumelib.reflection.Signatures.ClassnameAndDimensions
Record Components:
classname - the class name: a binary name or a primitive
dimensions - the number of array dimensions
Enclosing class:
Signatures

public static record Signatures.ClassnameAndDimensions(@BinaryNameOrPrimitiveType String classname, int dimensions) extends Record
A representation of an array: A pair of class name (a binary name or primitive) and the number of array dimensions.
  • Constructor Details

    • ClassnameAndDimensions

      public ClassnameAndDimensions(@BinaryNameOrPrimitiveType String classname, int dimensions)
      Creates an instance of a ClassnameAndDimensions record class.
      Parameters:
      classname - the value for the classname record component
      dimensions - the value for the dimensions record component
  • Method Details

    • parseFqBinaryName

      public static Signatures.ClassnameAndDimensions parseFqBinaryName(@FqBinaryName String typename)
      Constructs a new ClassnameAndDimensions by parsing a fully-qualified binary name.
      Parameters:
      typename - the type name to parse, as a fully-qualified binary name (= fully-qualified name, but with $ separating outer from inner types)
      Returns:
      the result of parsing the type name
    • 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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      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.
    • classname

      public @BinaryNameOrPrimitiveType String classname()
      Returns the value of the classname record component.
      Returns:
      the value of the classname record component
    • dimensions

      public int dimensions()
      Returns the value of the dimensions record component.
      Returns:
      the value of the dimensions record component