Package org.plumelib.reflection
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 primitivedimensions- 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 Summary
ConstructorsConstructorDescriptionClassnameAndDimensions(@BinaryNameOrPrimitiveType String classname, int dimensions) Creates an instance of aClassnameAndDimensionsrecord class. -
Method Summary
Modifier and TypeMethodDescription@BinaryNameOrPrimitiveType StringReturns the value of theclassnamerecord component.intReturns the value of thedimensionsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.parseFqBinaryName(@FqBinaryName String typename) Constructs a new ClassnameAndDimensions by parsing a fully-qualified binary name.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ClassnameAndDimensions
Creates an instance of aClassnameAndDimensionsrecord class.- Parameters:
classname- the value for theclassnamerecord componentdimensions- the value for thedimensionsrecord component
-
-
Method Details
-
parseFqBinaryName
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
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. -
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. -
equals
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 withObjects::equals(Object,Object); primitive components are compared with '=='. -
classname
Returns the value of theclassnamerecord component.- Returns:
- the value of the
classnamerecord component
-
dimensions
public int dimensions()Returns the value of thedimensionsrecord component.- Returns:
- the value of the
dimensionsrecord component
-