Module org.glavo.classfile
Package org.glavo.classfile.impl
Record Class UnboundAttribute.TypePathComponentImpl
java.lang.Object
java.lang.Record
org.glavo.classfile.impl.UnboundAttribute.TypePathComponentImpl
- All Implemented Interfaces:
TypeAnnotation.TypePathComponent
- Enclosing class:
UnboundAttribute<T extends Attribute<T>>
public static record UnboundAttribute.TypePathComponentImpl(TypeAnnotation.TypePathComponent.Kind typePathKind, int typeArgumentIndex)
extends Record
implements TypeAnnotation.TypePathComponent
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.glavo.classfile.TypeAnnotation.TypePathComponent
TypeAnnotation.TypePathComponent.Kind -
Field Summary
Fields inherited from interface org.glavo.classfile.TypeAnnotation.TypePathComponent
ARRAY, INNER_TYPE, WILDCARD -
Constructor Summary
ConstructorsConstructorDescriptionTypePathComponentImpl(TypeAnnotation.TypePathComponent.Kind typePathKind, int typeArgumentIndex) Creates an instance of aTypePathComponentImplrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.intReturns the value of thetypeArgumentIndexrecord component.Returns the value of thetypePathKindrecord component.
-
Constructor Details
-
TypePathComponentImpl
public TypePathComponentImpl(TypeAnnotation.TypePathComponent.Kind typePathKind, int typeArgumentIndex) Creates an instance of aTypePathComponentImplrecord class.- Parameters:
typePathKind- the value for thetypePathKindrecord componenttypeArgumentIndex- the value for thetypeArgumentIndexrecord component
-
-
Method Details
-
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 '=='. -
typePathKind
Returns the value of thetypePathKindrecord component.- Specified by:
typePathKindin interfaceTypeAnnotation.TypePathComponent- Returns:
- the value of the
typePathKindrecord component
-
typeArgumentIndex
public int typeArgumentIndex()Returns the value of thetypeArgumentIndexrecord component.- Specified by:
typeArgumentIndexin interfaceTypeAnnotation.TypePathComponent- Returns:
- the value of the
typeArgumentIndexrecord component
-