Package cs1302.tracer.model.modern
Record Class StackFrame
java.lang.Object
java.lang.Record
cs1302.tracer.model.modern.StackFrame
- Record Components:
methodName- The name of the executing method.line- The current line number in this frame.file- The relative source file path (if multi-file).isHighlighted- True if this is the currently active/topmost frame.thisObject- TheReferencepointing tothison the heap, or null.locals- The ordered list of local variables in this frame.
public record StackFrame(String methodName, long line, String file, boolean isHighlighted, Reference thisObject, List<Variable> locals)
extends Record
Represents a stack frame in the modern trace format.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.file()Returns the value of thefilerecord component.final inthashCode()Returns a hash code value for this object.booleanReturns the value of theisHighlightedrecord component.longline()Returns the value of thelinerecord component.locals()Returns the value of thelocalsrecord component.Returns the value of themethodNamerecord component.Returns the value of thethisObjectrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
StackFrame
public StackFrame(String methodName, long line, String file, boolean isHighlighted, Reference thisObject, List<Variable> locals) Creates an instance of aStackFramerecord class.- Parameters:
methodName- the value for themethodNamerecord componentline- the value for thelinerecord componentfile- the value for thefilerecord componentisHighlighted- the value for theisHighlightedrecord componentthisObject- the value for thethisObjectrecord componentlocals- the value for thelocalsrecord 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 '=='. -
methodName
Returns the value of themethodNamerecord component.- Returns:
- the value of the
methodNamerecord component
-
line
@SerializedName("line") public long line()Returns the value of thelinerecord component.- Returns:
- the value of the
linerecord component
-
file
Returns the value of thefilerecord component.- Returns:
- the value of the
filerecord component
-
isHighlighted
@SerializedName("isHighlighted") public boolean isHighlighted()Returns the value of theisHighlightedrecord component.- Returns:
- the value of the
isHighlightedrecord component
-
thisObject
Returns the value of thethisObjectrecord component.- Returns:
- the value of the
thisObjectrecord component
-
locals
Returns the value of thelocalsrecord component.- Returns:
- the value of the
localsrecord component
-