|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object dk.brics.grammar.parser.Location
public class Location
Representation of a location in a text.
Constructor Summary | |
---|---|
Location(String file,
int index,
int line,
int col)
Constructs a new location. |
|
Location(String file,
String contents,
int index)
Constructs a new location. |
Method Summary | |
---|---|
int |
getColumn()
Returns the column number. |
String |
getFile()
Returns the file name. |
int |
getIndex()
Returns the character index. |
int |
getLine()
Returns the line number. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Location(String file, int index, int line, int col)
file
- path or URL of text (null if unknown)index
- char indexline
- line numbercol
- column numberpublic Location(String file, String contents, int index)
file
- path or URL of text (null if unknown)contents
- contents of the textindex
- char index into the textMethod Detail |
---|
public int getColumn()
public String getFile()
public int getIndex()
public int getLine()
|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |