Add getXPathNodeName to the Node interface
A default implementation is available in AbstractNode to preserve compatibility with the previous way, which used Object.toString. Fixes #569
This commit is contained in:
@ -70,6 +70,12 @@ public abstract class AbstractEcmascriptNode<T extends AstNode> extends Abstract
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return getXPathNodeName();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String getXPathNodeName() {
|
||||
return node.shortName();
|
||||
}
|
||||
}
|
||||
|
@ -49,7 +49,7 @@ public class DumpFacade {
|
||||
writer.print(prefix);
|
||||
|
||||
// 2) JJT Name of the Node
|
||||
writer.print(node.toString());
|
||||
writer.print(node.getXPathNodeName());
|
||||
|
||||
//
|
||||
// If there are any additional details, then:
|
||||
|
Reference in New Issue
Block a user