public class ViewerModel
extends java.lang.Object
Constructor and Description |
---|
ViewerModel() |
Modifier and Type | Method and Description |
---|---|
void |
addViewerModelListener(ViewerModelListener l) |
void |
appendToXPathExpression(java.lang.String pathFragment,
java.lang.Object appender)
appends the given fragment to the XPath expression
|
void |
commitSource(java.lang.String source,
TargetJDKVersion jdk)
commits source code to the model.
|
void |
evaluateXPathExpression(java.lang.String xPath,
java.lang.Object evaluator)
evaluates the given XPath expression against the current tree
|
protected void |
fireViewerModelEvent(ViewerModelEvent e) |
java.util.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,
java.lang.Object selector)
selects the given node in the AST
|
public SimpleNode getRootNode()
public void commitSource(java.lang.String source, TargetJDKVersion jdk)
public boolean hasCompiledTree()
public void evaluateXPathExpression(java.lang.String xPath, java.lang.Object evaluator) throws ParseException, org.jaxen.JaxenException
xPath
- XPath expression to be evaluatedevaluator
- object which requests the evaluationParseException
org.jaxen.JaxenException
public java.util.List getLastEvaluationResults()
public void selectNode(SimpleNode node, java.lang.Object selector)
node
- node to be selectedselector
- object which requests the selectionpublic void appendToXPathExpression(java.lang.String pathFragment, java.lang.Object appender)
pathFragment
- fragment to be addedappender
- object that is trying to append the fragmentpublic void addViewerModelListener(ViewerModelListener l)
public void removeViewerModelListener(ViewerModelListener l)
protected void fireViewerModelEvent(ViewerModelEvent e)