public final class StringSourcePosition extends java.lang.Object implements SourcePosition
| Constructor and Description |
|---|
StringSourcePosition(java.lang.String string,
int line,
int column)
Construct a string source position.
|
| Modifier and Type | Method and Description |
|---|---|
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 denoted 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 StringSourcePosition(java.lang.String string,
int line,
int column)
string - the stringline - the line number.column - the column number.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