Record Class CompilationDiagnostic
java.lang.Object
java.lang.Record
de.firemage.autograder.core.compiler.CompilationDiagnostic
public record CompilationDiagnostic(SourceInfo sourceInfo, SourcePath path, int line, int column, String message, String code)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionCompilationDiagnostic(SourceInfo sourceInfo, SourcePath path, int line, int column, String message, String code) Creates an instance of aCompilationDiagnosticrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncode()Returns the value of thecoderecord component.intcolumn()Returns the value of thecolumnrecord component.final booleanIndicates whether some other object is "equal to" this one.static StringformatMultiple(List<CompilationDiagnostic> diagnostics) final inthashCode()Returns a hash code value for this object.intline()Returns the value of thelinerecord component.message()Returns the value of themessagerecord component.path()Returns the value of thepathrecord component.Returns the value of thesourceInforecord component.toString()Returns a string representation of this record class.
-
Constructor Details
-
CompilationDiagnostic
public CompilationDiagnostic(SourceInfo sourceInfo, SourcePath path, int line, int column, String message, String code) Creates an instance of aCompilationDiagnosticrecord class.- Parameters:
sourceInfo- the value for thesourceInforecord componentpath- the value for thepathrecord componentline- the value for thelinerecord componentcolumn- the value for thecolumnrecord componentmessage- the value for themessagerecord componentcode- the value for thecoderecord component
-
-
Method Details
-
formatMultiple
-
codePosition
-
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 '=='. -
sourceInfo
Returns the value of thesourceInforecord component.- Returns:
- the value of the
sourceInforecord component
-
path
Returns the value of thepathrecord component.- Returns:
- the value of the
pathrecord component
-
line
public int line()Returns the value of thelinerecord component.- Returns:
- the value of the
linerecord component
-
column
public int column()Returns the value of thecolumnrecord component.- Returns:
- the value of the
columnrecord component
-
message
Returns the value of themessagerecord component.- Returns:
- the value of the
messagerecord component
-
code
Returns the value of thecoderecord component.- Returns:
- the value of the
coderecord component
-