public class XpathQueryGenerator extends Object
DetailAst
element, line number and column number.
Example class
public class Main { public String sayHello(String name) { return "Hello, " + name; } }
Following expression returns list of queries. Each query is the string representing full path to the node inside Xpath tree, whose line number is 3 and column number is 4.
new XpathQueryGenerator(rootAst, 3, 4).generate();
Result list
Constructor and Description |
---|
XpathQueryGenerator(DetailAST rootAst,
int lineNumber,
int columnNumber,
FileText fileText,
int tabWidth)
Creates a new
XpathQueryGenerator instance. |
Modifier and Type | Method and Description |
---|---|
List<String> |
generate()
Returns list of xpath queries of nodes, matching line and column number.
|
public XpathQueryGenerator(DetailAST rootAst, int lineNumber, int columnNumber, FileText fileText, int tabWidth)
XpathQueryGenerator
instance.rootAst
- root astlineNumber
- line number of the element for which the query should be generatedcolumnNumber
- column number of the element for which the query should be generatedfileText
- the FileText
objecttabWidth
- distance between tab stop positionCopyright © 2001–2018. All rights reserved.