Module org.glavo.classfile
Package org.glavo.classfile.impl
Record Class TargetInfoImpl.LocalVarTargetImpl
java.lang.Object
java.lang.Record
org.glavo.classfile.impl.TargetInfoImpl.LocalVarTargetImpl
- All Implemented Interfaces:
TypeAnnotation.LocalVarTarget,TypeAnnotation.TargetInfo
- Enclosing class:
TargetInfoImpl
public static record TargetInfoImpl.LocalVarTargetImpl(TypeAnnotation.TargetType targetType, List<TypeAnnotation.LocalVarTargetInfo> table)
extends Record
implements TypeAnnotation.LocalVarTarget
-
Constructor Summary
ConstructorsConstructorDescriptionLocalVarTargetImpl(TypeAnnotation.TargetType targetType, List<TypeAnnotation.LocalVarTargetInfo> table) Creates an instance of aLocalVarTargetImplrecord 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.intsize()Returns the size of the target info.table()Returns the value of thetablerecord component.Returns the value of thetargetTyperecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
LocalVarTargetImpl
public LocalVarTargetImpl(TypeAnnotation.TargetType targetType, List<TypeAnnotation.LocalVarTargetInfo> table) Creates an instance of aLocalVarTargetImplrecord class.- Parameters:
targetType- the value for thetargetTyperecord componenttable- the value for thetablerecord component
-
-
Method Details
-
size
public int size()Description copied from interface:TypeAnnotation.TargetInfoReturns the size of the target info.- Specified by:
sizein interfaceTypeAnnotation.TargetInfo- Returns:
- the size of the target info
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
targetType
Returns the value of thetargetTyperecord component.- Specified by:
targetTypein interfaceTypeAnnotation.TargetInfo- Returns:
- the value of the
targetTyperecord component
-
table
Returns the value of thetablerecord component.- Specified by:
tablein interfaceTypeAnnotation.LocalVarTarget- Returns:
- the value of the
tablerecord component
-