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 SourcePositionpublic int getLine()
getLine in interface SourcePositionpublic int getColumn()
getColumn in interface SourcePositionpublic int getOffset()
getOffset in interface SourcePositionpublic int getLength()
getLength in interface SourcePositionpublic java.lang.String toString()
toString in interface SourcePositiontoString in class java.lang.Objectpublic java.lang.String getSourceLine()
getSourceLine in interface SourcePositionpublic void setIdentifier(Identifier ident)
setIdentifier in interface SourcePositionident - the identifier to be registered.public Identifier getIdentifier()
getIdentifier in interface SourcePosition