Package cs1302.tracer.trace
Record Class ExecutionSnapshot.StackSnapshot.ThisObject
java.lang.Object
java.lang.Record
cs1302.tracer.trace.ExecutionSnapshot.StackSnapshot.ThisObject
- Record Components:
typeName- The name of type ofthis. Note that the name may differ from the type of the object's underlying value due to polymorphism.value- A reference to the value ofthis.
- Enclosing class:
ExecutionSnapshot.StackSnapshot
public static record ExecutionSnapshot.StackSnapshot.ThisObject(String typeName, TraceValue.Reference value)
extends Record
A pair that includes the type name of and a reference to the value of
this.-
Constructor Summary
ConstructorsConstructorDescriptionThisObject(String typeName, TraceValue.Reference value) Creates an instance of aThisObjectrecord 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.typeName()Returns the value of thetypeNamerecord component.value()Returns the value of thevaluerecord component.
-
Constructor Details
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
typeName
Returns the value of thetypeNamerecord component.- Returns:
- the value of the
typeNamerecord component
-
value
Returns the value of thevaluerecord component.- Returns:
- the value of the
valuerecord component
-