public class SourceAnnotation
extends java.lang.Object
Constructor and Description |
---|
SourceAnnotation(SourcePosition pos,
java.lang.String text)
Construct a source annotation.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getLine(int i)
Get a line from the annotation.
|
int |
getLines()
Get the number of lines of the annotation.
|
SourcePosition |
getPosition()
Get the source position of the annotation.
|
SourcePosition |
newPosition(int line,
int column)
Construct position in this source.
|
public SourceAnnotation(SourcePosition pos, java.lang.String text)
pos
- the position of the annotation in a source.text
- the text of the annotation.public SourcePosition getPosition()
public int getLines()
public java.lang.String getLine(int i)
i
- the index of a line in the annotation.public SourcePosition newPosition(int line, int column)
line
- the line number.column
- the column number.