Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## net.sourceforge.pmd.util.viewer.model
Class ViewerModel

    java.lang.Object
      net.sourceforge.pmd.util.viewer.model.ViewerModel

public class ViewerModel
extends java.lang.Object

Constructor Summary
`ViewerModel()`

Method Summary
`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

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ViewerModel

    public ViewerModel()

Method Detail

### getRootNode

    public SimpleNode getRootNode()

### commitSource

    public void commitSource(java.lang.String source,
                             TargetJDKVersion jdk)

  commits source code to the model. all existing source will be replaced

### hasCompiledTree

    public boolean hasCompiledTree()

  determines whether the model has a compiled tree at it's disposal

  Returns:
    true if there is an AST, false otherwise

### evaluateXPathExpression

    public void evaluateXPathExpression(java.lang.String xPath,
                                        java.lang.Object evaluator)
                                 throws ParseException,
                                        org.jaxen.JaxenException

  evaluates the given XPath expression against the current tree

  Parameters:
    `xPath` - XPath expression to be evaluated
    `evaluator` - object which requests the evaluation
  Throws:
    `ParseException`
    `org.jaxen.JaxenException`

### getLastEvaluationResults

    public java.util.List getLastEvaluationResults()

  retrieves the results of last evaluation

  Returns:
    a list containing the nodes selected by the last XPath expression

    evaluation

### selectNode

    public void selectNode(SimpleNode node,
                           java.lang.Object selector)

  selects the given node in the AST

  Parameters:
    `node` - node to be selected
    `selector` - object which requests the selection

### appendToXPathExpression

    public void appendToXPathExpression(java.lang.String pathFragment,
                                        java.lang.Object appender)

  appends the given fragment to the XPath expression

  Parameters:
    `pathFragment` - fragment to be added
    `appender` - object that is trying to append the fragment

### addViewerModelListener

    public void addViewerModelListener(ViewerModelListener l)

### removeViewerModelListener

    public void removeViewerModelListener(ViewerModelListener l)

### fireViewerModelEvent

    protected void fireViewerModelEvent(ViewerModelEvent e)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2002-2006 InfoEther. All Rights Reserved.