Package cs1302.tracer.model.pytutor
Record Class PyTutorTrace
java.lang.Object
java.lang.Record
cs1302.tracer.model.pytutor.PyTutorTrace
- Record Components:
code- The original Java source code.stdin- The input provided via standard input.trace- The list of trace steps representing memory snapshots.userlog- User log messages, if any.sources- All submitted source files keyed by relative path.entryFile- The selected entry point source path.
public record PyTutorTrace(String code, String stdin, List<TraceStep> trace, String userlog, Map<String,String> sources, String entryFile)
extends Record
Represents the root OnlinePythonTutor trace output format.
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs a trace and derives source metadata from the original input.PyTutorTrace(String code, String stdin, List<TraceStep> trace, String userlog, SourceMetadata metadata) Constructs a trace using source metadata parsed once.PyTutorTrace(String code, String stdin, List<TraceStep> trace, String userlog, Map<String, String> sources, String entryFile) Creates an instance of aPyTutorTracerecord class. -
Method Summary
Modifier and TypeMethodDescriptioncode()Returns the value of thecoderecord component.Returns the value of theentryFilerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.sources()Returns the value of thesourcesrecord component.stdin()Returns the value of thestdinrecord component.final StringtoString()Returns a string representation of this record class.trace()Returns the value of thetracerecord component.userlog()Returns the value of theuserlogrecord component.
-
Constructor Details
-
PyTutorTrace
Constructs a trace and derives source metadata from the original input.- Parameters:
code- Original source input.stdin- Standard input.trace- Trace steps.userlog- User log messages.
-
PyTutorTrace
public PyTutorTrace(String code, String stdin, List<TraceStep> trace, String userlog, SourceMetadata metadata) Constructs a trace using source metadata parsed once.- Parameters:
code- Original source input.stdin- Standard input.trace- Trace steps.userlog- User log messages.metadata- Parsed source metadata.
-
PyTutorTrace
public PyTutorTrace(String code, String stdin, List<TraceStep> trace, String userlog, Map<String, String> sources, String entryFile) Creates an instance of aPyTutorTracerecord class.- Parameters:
code- the value for thecoderecord componentstdin- the value for thestdinrecord componenttrace- the value for thetracerecord componentuserlog- the value for theuserlogrecord 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
-
stdin
Returns the value of thestdinrecord component.- Returns:
- the value of the
stdinrecord component
-
trace
Returns the value of thetracerecord component.- Returns:
- the value of the
tracerecord component
-
userlog
Returns the value of theuserlogrecord component.- Returns:
- the value of the
userlogrecord 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
-