public final class SourceAnnotationPosition extends java.lang.Object implements SourcePosition
Constructor and Description |
---|
SourceAnnotationPosition(SourceAnnotation annotation,
int aline,
int acolumn)
Construct a source annotation position.
|
Modifier and Type | Method and Description |
---|---|
SourceAnnotation |
getAnnotation()
Get the annotation of the position.
|
int |
getAnnotationColumn()
Get the annotation column number of the position.
|
int |
getAnnotationLine()
Get the annotation number of the position.
|
int |
getColumn()
Get the column number of the position.
|
Identifier |
getIdentifier()
Get identifier registered with denoted position.
|
int |
getLength()
Get number of characters from current position to end of line.
|
int |
getLine()
Get the line number of the position.
|
int |
getOffset()
Get offset of the position.
|
Source |
getSource()
Get the source file.
|
java.lang.String |
getSourceLine()
Get source line corresponding to position.
|
void |
setIdentifier(Identifier ident)
Register identifier with denoted position.
|
java.lang.String |
toString()
Get printable text representation of position.
|
public SourceAnnotationPosition(SourceAnnotation annotation, int aline, int acolumn)
annotation
- the annotationaline
- the line number in the annotation (base 0)acolumn
- the column number in the annotation (base 0)public SourceAnnotation getAnnotation()
public int getAnnotationLine()
public int getAnnotationColumn()
public Source getSource()
getSource
in interface SourcePosition
public int getLine()
getLine
in interface SourcePosition
public int getColumn()
getColumn
in interface SourcePosition
public int getOffset()
getOffset
in interface SourcePosition
public int getLength()
getLength
in interface SourcePosition
public java.lang.String toString()
toString
in interface SourcePosition
toString
in class java.lang.Object
public java.lang.String getSourceLine()
getSourceLine
in interface SourcePosition
public void setIdentifier(Identifier ident)
setIdentifier
in interface SourcePosition
ident
- the identifier to be registered.public Identifier getIdentifier()
getIdentifier
in interface SourcePosition