net.sf.joost.grammar
Class ReversableTree

java.lang.Object
  extended bynet.sf.joost.grammar.Tree
      extended bynet.sf.joost.grammar.ReversableTree
Direct Known Subclasses:
ChildTree, DdotTree, DescTree, DotTree

public abstract class ReversableTree
extends Tree

A ReversableTree object can be reconstructed by reversing its associativity.

Version:
$Revision: 2.1 $ $Date: 2004/09/29 05:59:50 $
Author:
Oliver Becker

Field Summary
 
Fields inherited from class net.sf.joost.grammar.Tree
ADD, AND, ATTR, ATTR_LOCAL_WILDCARD, ATTR_URI_WILDCARD, ATTR_WILDCARD, AVT, CDATA_TEST, CHILD, COMMENT_TEST, DDOT, DESC, DIV, DOT, EQ, FUNCTION, GE, GT, LE, left, LIST, lName, LOCAL_WILDCARD, LT, MOD, MULT, NAME_TEST, NE, NODE_TEST, NUMBER, OR, PI_TEST, PREDICATE, right, ROOT, SEQ, STRING, SUB, TEXT_TEST, type, UNION, uri, URI_WILDCARD, value, VALUE, VAR, WILDCARD
 
Constructor Summary
ReversableTree(int type)
           
ReversableTree(int type, Tree left, Tree right)
           
 
Method Summary
 Tree reverseAssociativity()
          Transforms a location path by reversing the associativity of the path operators / and //
 
Methods inherited from class net.sf.joost.grammar.Tree
evaluate, evaluate, getPriority, matches, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ReversableTree

public ReversableTree(int type)

ReversableTree

public ReversableTree(int type,
                      Tree left,
                      Tree right)
Method Detail

reverseAssociativity

public Tree reverseAssociativity()
Transforms a location path by reversing the associativity of the path operators / and //

Overrides:
reverseAssociativity in class Tree
Returns:
the new root