Package cs1302.tracer.model.modern
Record Class Trace
java.lang.Object
java.lang.Record
cs1302.tracer.model.modern.Trace
- Record Components:
code- The original Java source code (or delimited multi-file stream).format- The trace format identifier ("modern").stdin- The standard input provided to the program.steps- The sequential list of trace steps.breakpoints- Optional mapping of breakpoint line numbers to steps when tracing specific breakpoints.sources- All submitted source files keyed by relative path.entryFile- The selected entry point source path.
public record Trace(String code, String format, String stdin, List<Step> steps, Map<Integer,Object> breakpoints, Map<String,String> sources, String entryFile)
extends Record
Root output model for the modern trace format.
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs a trace and derives its source metadata from the original input.Trace(String code, String format, String stdin, List<Step> steps, Map<Integer, Object> breakpoints, Map<String, String> sources, String entryFile) Creates an instance of aTracerecord class.Constructs a full sequential trace with stdin.Constructs a breakpoint-mapped trace with stdin.Constructs a full sequential trace defaulting to empty stdin.Constructs a breakpoint-mapped trace defaulting to empty stdin. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thebreakpointsrecord component.code()Returns the value of thecoderecord component.Returns the value of theentryFilerecord component.final booleanIndicates whether some other object is "equal to" this one.format()Returns the value of theformatrecord component.final inthashCode()Returns a hash code value for this object.sources()Returns the value of thesourcesrecord component.stdin()Returns the value of thestdinrecord component.steps()Returns the value of thestepsrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Trace
public Trace(String code, String format, String stdin, List<Step> steps, Map<Integer, Object> breakpoints) Constructs a trace and derives its source metadata from the original input.- Parameters:
code- Original source input.format- Format identifier.stdin- Standard input.steps- Sequential steps, or null for breakpoint output.breakpoints- Breakpoint output, or null for sequential output.
-
Trace
Constructs a full sequential trace with stdin.- Parameters:
code- The source code.stdin- The standard input.steps- The trace steps.
-
Trace
Constructs a breakpoint-mapped trace with stdin.- Parameters:
code- The source code.stdin- The standard input.breakpoints- The breakpoints map.
-
Trace
Constructs a full sequential trace defaulting to empty stdin.- Parameters:
code- The source code.steps- The trace steps.
-
Trace
Constructs a breakpoint-mapped trace defaulting to empty stdin.- Parameters:
code- The source code.breakpoints- The breakpoints map.
-
Trace
public Trace(String code, String format, String stdin, List<Step> steps, Map<Integer, Object> breakpoints, Map<String, String> sources, String entryFile) Creates an instance of aTracerecord class.- Parameters:
code- the value for thecoderecord componentformat- the value for theformatrecord componentstdin- the value for thestdinrecord componentsteps- the value for thestepsrecord componentbreakpoints- the value for thebreakpointsrecord componentsources- the value for thesourcesrecord componententryFile- the value for theentryFilerecord 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. All components in this record class are compared withObjects::equals(Object,Object). -
code
Returns the value of thecoderecord component.- Returns:
- the value of the
coderecord component
-
format
Returns the value of theformatrecord component.- Returns:
- the value of the
formatrecord component
-
stdin
Returns the value of thestdinrecord component.- Returns:
- the value of the
stdinrecord component
-
steps
Returns the value of thestepsrecord component.- Returns:
- the value of the
stepsrecord component
-
breakpoints
Returns the value of thebreakpointsrecord component.- Returns:
- the value of the
breakpointsrecord component
-
sources
Returns the value of thesourcesrecord component.- Returns:
- the value of the
sourcesrecord component
-
entryFile
Returns the value of theentryFilerecord component.- Returns:
- the value of the
entryFilerecord component
-