|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Location
Represents the location of a node within its document.
Location is a span from a starting line and column to an ending line and column; or alternatively, from a starting character position to an ending character position.
Method Summary | |
---|---|
int |
getEndColumn()
Returns the column where this node ends. |
int |
getEndLine()
Returns the line where this node ends. |
int |
getEndPos()
Returns the character position where this node ends. |
int |
getStartColumn()
Returns the column where this node starts. |
int |
getStartLine()
Returns the line where this node starts. |
int |
getStartPos()
Returns the character position where this node starts. |
String |
getText(boolean headOnly)
Returns the text of this location. |
Method Detail |
---|
int getStartLine()
int getStartColumn()
int getStartPos()
int getEndLine()
int getEndColumn()
int getEndPos()
String getText(boolean headOnly)
If this location is an element
and headOnly
is true, returns only the text of the head
of the element. For example,
returns "<Foo a='1' b='2'><Bar c='3'></Foo>" if<Foo a="1" b="2"> <Bar c="3"> </Foo>
headOnly
is false, "<Foo a='1' b='2'>" if it is
true.
headOnly
- Whether to return only the head of elements
|
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |