|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.pdark.decentxml.Location
public class Location
Nested Class Summary | |
---|---|
static class |
Location.NodeFoundException
This is just a marker that the node has been found |
static class |
Location.ReusableXMLSource
|
Constructor Summary | |
---|---|
Location(Document document,
Node node)
|
|
Location(Element e)
|
|
Location(Token token)
|
|
Location(XMLSource source,
int offset)
|
Method Summary | |
---|---|
protected void |
calcLocation()
This method is called when an information is requested from the location |
protected void |
calcLocationFromElement()
|
protected void |
calcLocationFromSource()
This method is called when the location information comes from an XML source |
int |
getColumn()
The column. |
int |
getLine()
The line number |
int |
getLineStartOffset()
Offset at which the current line starts in the document |
int |
getOffset()
|
protected void |
moveToOffset(XMLSource source,
int offset)
This moves the line and column information by the text found in the source. |
protected void |
nodeNotFound()
This method is called when you specify a child node of an element but when the location is requested, this node cannot be found. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Location(XMLSource source, int offset)
public Location(Element e)
public Location(Document document, Node node)
public Location(Token token)
Method Detail |
---|
public int getOffset()
public int getLine()
public int getColumn()
public int getLineStartOffset()
protected void calcLocation()
protected void calcLocationFromSource()
protected void moveToOffset(XMLSource source, int offset)
protected void calcLocationFromElement()
protected void nodeNotFound()
By default, this method just resets the location but you can override it to throw an exception, if you like.
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |