net.sourceforge.pmd.util.viewer.model
public class ViewerModel extends Object
Constructor Summary | |
---|---|
ViewerModel() |
Method Summary | |
---|---|
void | addViewerModelListener(ViewerModelListener l) |
void | appendToXPathExpression(String pathFragment, Object appender)
appends the given fragment to the XPath expression
|
void | commitSource(String source, TargetJDKVersion jdk)
commits source code to the model.
all existing source will be replaced |
void | evaluateXPathExpression(String xPath, Object evaluator)
evaluates the given XPath expression against the current tree
|
protected void | fireViewerModelEvent(ViewerModelEvent e) |
List | getLastEvaluationResults()
retrieves the results of last evaluation
|
SimpleNode | getRootNode() |
boolean | hasCompiledTree()
determines whether the model has a compiled tree at it's disposal
|
void | removeViewerModelListener(ViewerModelListener l) |
void | selectNode(SimpleNode node, Object selector)
selects the given node in the AST
|
Parameters: pathFragment fragment to be added appender object that is trying to append the fragment
Parameters: xPath XPath expression to be evaluated evaluator object which requests the evaluation
Returns: a list containing the nodes selected by the last XPath expression evaluation
Returns: true if there is an AST, false otherwise
Parameters: node node to be selected selector object which requests the selection