Record Class SourceSpan
java.lang.Object
java.lang.Record
org.clafer.frontend.SourceSpan
- Record Components:
line- the first linecolumn- the first columnendLine- the last lineendColumn- the column after the last character
Where a clafer, constraint, assertion or objective is in the source model:
from line:column up to, not including, endLine:endColumn. Lines and columns
start at 1, as in the Clafer compiler's error messages.
-
Constructor Summary
ConstructorsConstructorDescriptionSourceSpan(int line, int column, int endLine, int endColumn) Creates an instance of aSourceSpanrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic SourceSpanat(int line, int column) intcolumn()Returns the value of thecolumnrecord component.intReturns the value of theendColumnrecord component.intendLine()Returns the value of theendLinerecord component.final booleanIndicates whether some other object is "equal to" this one.Prefixes a message with the start of this span, as the compiler's messages are.final inthashCode()Returns a hash code value for this object.intline()Returns the value of thelinerecord component.toString()Returns a string representation of this record class.
-
Constructor Details
-
Method Details
-
at
- Parameters:
line- the linecolumn- the column- Returns:
- the empty span at a position, for when only the start is known
-
format
-
toString
-
hashCode
-
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 with thecomparemethod from their corresponding wrapper classes. -
line
-
column
-
endLine
-
endColumn
-