Package cs1302.tracer.model
Record Class SourceMetadata
java.lang.Object
java.lang.Record
cs1302.tracer.model.SourceMetadata
- Record Components:
sources- Source paths mapped to the exact contents supplied to the compiler.entryFile- The selected entry point's source path.
Source text and entry point shared by both trace formats.
-
Constructor Summary
ConstructorsConstructorDescriptionSourceMetadata(Map<String, String> sources, String entryFile) Creates an instance of aSourceMetadatarecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theentryFilerecord component.final booleanIndicates whether some other object is "equal to" this one.static SourceMetadataSplits the original input using the compiler's source parser.final inthashCode()Returns a hash code value for this object.sources()Returns the value of thesourcesrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Method Details
-
from
Splits the original input using the compiler's source parser.- Parameters:
code- Original single-file source or delimited source stream.- Returns:
- Source metadata independent of which files appear in the trace.
-
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). -
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
-