public interface LocationCapable
| Modifier and Type | Method and Description |
|---|---|
int |
getColumnNumber()
Returns the column number corresponding to the given source character position in the original source string.
|
int |
getEndPosition()
Returns the character index into the original source file indicating where the source fragment corresponding to
this element ends.
|
int |
getLineNumber()
Returns the line number corresponding to the given source character position in the original source string.
|
int |
getStartPosition()
Returns the character index into the original source file indicating where the source fragment corresponding to
this element begins.
|
int getStartPosition()
int getEndPosition()
int getLineNumber()
class A\n{\n} has 3 lines corresponding to inclusive character ranges
[0,7], [8,9], and [10,10]. Returns -1 for a character position that does not correspond to any source line, or -2
if no line number information is available for this compilation unit.-1 if the character position does not correspond to a source line
in the original source file or -2 if line number information is not known for this
compilation unitint getColumnNumber()
-1 if it is beyond the valid range or -2 if the
column number information is unknown.-1 if the character position does not correspond to a source
line in the original source file or -2 if column number information is unknown for this
compilation unitCopyright © 2017 JBoss by Red Hat. All rights reserved.