Package cs1302.tracer.model.modern
Record Class Step
java.lang.Object
java.lang.Record
cs1302.tracer.model.modern.Step
- Record Components:
step- The sequential step index (1-based).line- The current line number.file- The relative source file path (if multi-file).event- The event type (e.g. "step_line").method- The currently executing method name.callStack- The call stack frames (bottommost frame at index 0).statics- The loaded static/global variables.heap- The heap objects map keyed by unique reference ID.stdout- Standard output captured up to this step.stderr- Standard error captured up to this step.stdinConsumed- Standard input consumed up to this step.stdinOffset- Character offset reached in standard input up to this step.threads- Application threads, or null for legacy traces.triggeringThreadId- Event thread identity, or null for legacy traces.
public record Step(int step, long line, String file, String event, String method, List<StackFrame> callStack, List<Variable> statics, Map<String,HeapObject> heap, String stdout, String stderr, String stdinConsumed, int stdinOffset, List<Step.ThreadState> threads, Long triggeringThreadId)
extends Record
Represents a single execution step in the modern trace format.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordA thread's stack and execution state at a trace step. -
Constructor Summary
ConstructorsConstructorDescriptionStep(int step, long line, String file, String event, String method, List<StackFrame> callStack, List<Variable> statics, Map<String, HeapObject> heap, String stdout, String stderr) Constructs a step defaulting stdin tracking attributes.Step(int step, long line, String file, String event, String method, List<StackFrame> callStack, List<Variable> statics, Map<String, HeapObject> heap, String stdout, String stderr, String stdinConsumed, int stdinOffset) Constructs a step without thread metadata.Step(int step, long line, String file, String event, String method, List<StackFrame> callStack, List<Variable> statics, Map<String, HeapObject> heap, String stdout, String stderr, String stdinConsumed, int stdinOffset, List<Step.ThreadState> threads, Long triggeringThreadId) Creates an instance of aSteprecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecallStackrecord component.final booleanIndicates whether some other object is "equal to" this one.event()Returns the value of theeventrecord component.file()Returns the value of thefilerecord component.final inthashCode()Returns a hash code value for this object.heap()Returns the value of theheaprecord component.longline()Returns the value of thelinerecord component.method()Returns the value of themethodrecord component.statics()Returns the value of thestaticsrecord component.stderr()Returns the value of thestderrrecord component.Returns the value of thestdinConsumedrecord component.intReturns the value of thestdinOffsetrecord component.stdout()Returns the value of thestdoutrecord component.intstep()Returns the value of thesteprecord component.threads()Returns the value of thethreadsrecord component.final StringtoString()Returns a string representation of this record class.Returns the value of thetriggeringThreadIdrecord component.
-
Constructor Details
-
Step
public Step(int step, long line, String file, String event, String method, List<StackFrame> callStack, List<Variable> statics, Map<String, HeapObject> heap, String stdout, String stderr, String stdinConsumed, int stdinOffset) Constructs a step without thread metadata.- Parameters:
step- Step number.line- Source line.file- Source file.event- Event kind.method- Executing method.callStack- Stack frames.statics- Static fields.heap- Heap objects.stdout- Standard output.stderr- Standard error.stdinConsumed- Consumed input.stdinOffset- Input offset.
-
Step
public Step(int step, long line, String file, String event, String method, List<StackFrame> callStack, List<Variable> statics, Map<String, HeapObject> heap, String stdout, String stderr) Constructs a step defaulting stdin tracking attributes.- Parameters:
step- The sequential step index.line- The current line number.file- The relative source file path.event- The event type.method- The executing method name.callStack- The call stack frames.statics- Static variables.heap- Heap objects map.stdout- Captured standard output.stderr- Captured standard error.
-
Step
public Step(int step, long line, String file, String event, String method, List<StackFrame> callStack, List<Variable> statics, Map<String, HeapObject> heap, String stdout, String stderr, String stdinConsumed, int stdinOffset, List<Step.ThreadState> threads, Long triggeringThreadId) Creates an instance of aSteprecord class.- Parameters:
step- the value for thesteprecord componentline- the value for thelinerecord componentfile- the value for thefilerecord componentevent- the value for theeventrecord componentmethod- the value for themethodrecord componentcallStack- the value for thecallStackrecord componentstatics- the value for thestaticsrecord componentheap- the value for theheaprecord componentstdout- the value for thestdoutrecord componentstderr- the value for thestderrrecord componentstdinConsumed- the value for thestdinConsumedrecord componentstdinOffset- the value for thestdinOffsetrecord componentthreads- the value for thethreadsrecord componenttriggeringThreadId- the value for thetriggeringThreadIdrecord 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 '=='. -
step
@SerializedName("step") public int step()Returns the value of thesteprecord component.- Returns:
- the value of the
steprecord 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
-
event
Returns the value of theeventrecord component.- Returns:
- the value of the
eventrecord component
-
method
Returns the value of themethodrecord component.- Returns:
- the value of the
methodrecord component
-
callStack
Returns the value of thecallStackrecord component.- Returns:
- the value of the
callStackrecord component
-
statics
Returns the value of thestaticsrecord component.- Returns:
- the value of the
staticsrecord component
-
heap
Returns the value of theheaprecord component.- Returns:
- the value of the
heaprecord component
-
stdout
Returns the value of thestdoutrecord component.- Returns:
- the value of the
stdoutrecord component
-
stderr
Returns the value of thestderrrecord component.- Returns:
- the value of the
stderrrecord component
-
stdinConsumed
Returns the value of thestdinConsumedrecord component.- Returns:
- the value of the
stdinConsumedrecord component
-
stdinOffset
@SerializedName("stdinOffset") public int stdinOffset()Returns the value of thestdinOffsetrecord component.- Returns:
- the value of the
stdinOffsetrecord component
-
threads
Returns the value of thethreadsrecord component.- Returns:
- the value of the
threadsrecord component
-
triggeringThreadId
Returns the value of thetriggeringThreadIdrecord component.- Returns:
- the value of the
triggeringThreadIdrecord component
-