Module org.glavo.classfile
Package org.glavo.classfile.impl
Record Class TargetInfoImpl.TypeParameterTargetImpl
java.lang.Object
java.lang.Record
org.glavo.classfile.impl.TargetInfoImpl.TypeParameterTargetImpl
- All Implemented Interfaces:
TypeAnnotation.TargetInfo,TypeAnnotation.TypeParameterTarget
- Enclosing class:
TargetInfoImpl
public static record TargetInfoImpl.TypeParameterTargetImpl(TypeAnnotation.TargetType targetType, int typeParameterIndex)
extends Record
implements TypeAnnotation.TypeParameterTarget
-
Constructor Summary
ConstructorsConstructorDescriptionTypeParameterTargetImpl(TypeAnnotation.TargetType targetType, int typeParameterIndex) Creates an instance of aTypeParameterTargetImplrecord 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.Returns the value of thetargetTyperecord component.final StringtoString()Returns a string representation of this record class.intReturns the value of thetypeParameterIndexrecord component.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.glavo.classfile.TypeAnnotation.TargetInfo
size
-
Constructor Details
-
TypeParameterTargetImpl
Creates an instance of aTypeParameterTargetImplrecord class.- Parameters:
targetType- the value for thetargetTyperecord componenttypeParameterIndex- the value for thetypeParameterIndexrecord 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 '=='. -
targetType
Returns the value of thetargetTyperecord component.- Specified by:
targetTypein interfaceTypeAnnotation.TargetInfo- Returns:
- the value of the
targetTyperecord component
-
typeParameterIndex
public int typeParameterIndex()Returns the value of thetypeParameterIndexrecord component.- Specified by:
typeParameterIndexin interfaceTypeAnnotation.TypeParameterTarget- Returns:
- the value of the
typeParameterIndexrecord component
-