org.jaxen

Class JaxenHandler

public class JaxenHandler extends Object implements XPathHandler

SAXPath XPathHandler implementation capable of building Jaxen expression trees which can walk various different object models.

Author: bob mcwhirter (bob@werken.com)

Field Summary
protected booleansimplified
?
protected LinkedListstack
This may be changed to an ArrayList in the future (i.e. version >= 1.2).
XPathExprxpath
XPathFactoryxpathFactory
Constructor Summary
JaxenHandler()
Constructor
Method Summary
protected voidaddParameters(FunctionCallExpr function, Iterator paramIter)
protected voidaddPredicates(Predicated obj, Iterator predIter)
protected voidaddSteps(LocationPath locationPath, Iterator stepIter)
protected booleancanPop()
voidendAbsoluteLocationPath()
voidendAdditiveExpr(int operator)
voidendAllNodeStep()
voidendAndExpr(boolean create)
voidendCommentNodeStep()
voidendEqualityExpr(int operator)
voidendFilterExpr()
voidendFunction()
protected voidendLocationPath()
voidendMultiplicativeExpr(int operator)
voidendNameStep()
voidendOrExpr(boolean create)
voidendPathExpr()
voidendPredicate()
voidendProcessingInstructionNodeStep()
voidendRelationalExpr(int operator)
voidendRelativeLocationPath()
protected voidendStep()
voidendTextNodeStep()
voidendUnaryExpr(int operator)
voidendUnionExpr(boolean create)
voidendXPath()
XPathExprgetXPathExpr()
Retrieve the simplified Jaxen XPath expression tree.
XPathExprgetXPathExpr(boolean shouldSimplify)
Retrieve the Jaxen XPath expression tree, optionally simplified.
XPathFactorygetXPathFactory()
Retrieve the Jaxen XPathFactory used during the parse to construct the XPath expression tree.
voidliteral(String literal)
voidnumber(int number)
voidnumber(double number)
protected LinkedListpeekFrame()
protected Objectpop()
protected LinkedListpopFrame()
protected voidpush(Object obj)
protected voidpushFrame()
protected voidreturnExpr()
voidsetXPathFactory(XPathFactory xpathFactory)
Set the Jaxen XPathFactory that constructs the XPath expression tree during the parse.
protected intstackSize()
voidstartAbsoluteLocationPath()
voidstartAdditiveExpr()
voidstartAllNodeStep(int axis)
voidstartAndExpr()
voidstartCommentNodeStep(int axis)
voidstartEqualityExpr()
voidstartFilterExpr()
voidstartFunction(String prefix, String functionName)
voidstartMultiplicativeExpr()
voidstartNameStep(int axis, String prefix, String localName)
voidstartOrExpr()
voidstartPathExpr()
voidstartPredicate()
voidstartProcessingInstructionNodeStep(int axis, String name)
voidstartRelationalExpr()
voidstartRelativeLocationPath()
voidstartTextNodeStep(int axis)
voidstartUnaryExpr()
voidstartUnionExpr()
voidstartXPath()
voidvariableReference(String prefix, String variableName)

Field Detail

simplified

protected boolean simplified
????

stack

protected LinkedList stack
This may be changed to an ArrayList in the future (i.e. version >= 1.2). You really shouldn't be accessing this field directly, but if you are please try to use it as a generic List. Don't use the methods that are only available in LinkedList.

xpath

private XPathExpr xpath

xpathFactory

private XPathFactory xpathFactory

Constructor Detail

JaxenHandler

public JaxenHandler()
Constructor

Method Detail

addParameters

protected void addParameters(FunctionCallExpr function, Iterator paramIter)

addPredicates

protected void addPredicates(Predicated obj, Iterator predIter)

addSteps

protected void addSteps(LocationPath locationPath, Iterator stepIter)

canPop

protected boolean canPop()

endAbsoluteLocationPath

public void endAbsoluteLocationPath()

endAdditiveExpr

public void endAdditiveExpr(int operator)

endAllNodeStep

public void endAllNodeStep()

endAndExpr

public void endAndExpr(boolean create)

endCommentNodeStep

public void endCommentNodeStep()

endEqualityExpr

public void endEqualityExpr(int operator)

endFilterExpr

public void endFilterExpr()

endFunction

public void endFunction()

endLocationPath

protected void endLocationPath()

endMultiplicativeExpr

public void endMultiplicativeExpr(int operator)

endNameStep

public void endNameStep()

endOrExpr

public void endOrExpr(boolean create)

endPathExpr

public void endPathExpr()

endPredicate

public void endPredicate()

endProcessingInstructionNodeStep

public void endProcessingInstructionNodeStep()

endRelationalExpr

public void endRelationalExpr(int operator)

endRelativeLocationPath

public void endRelativeLocationPath()

endStep

protected void endStep()

endTextNodeStep

public void endTextNodeStep()

endUnaryExpr

public void endUnaryExpr(int operator)

endUnionExpr

public void endUnionExpr(boolean create)

endXPath

public void endXPath()

getXPathExpr

public XPathExpr getXPathExpr()
Retrieve the simplified Jaxen XPath expression tree.

This method is only valid once XPathReader.parse(...) successfully returned.

Returns: the XPath expression tree

getXPathExpr

public XPathExpr getXPathExpr(boolean shouldSimplify)
Retrieve the Jaxen XPath expression tree, optionally simplified.

This method is only valid once XPathReader.parse(...) successfully returned.

Parameters: shouldSimplify ????

Returns: the XPath expression tree

getXPathFactory

public XPathFactory getXPathFactory()
Retrieve the Jaxen XPathFactory used during the parse to construct the XPath expression tree.

Returns: the XPathFactory used during the parse.

literal

public void literal(String literal)

number

public void number(int number)

number

public void number(double number)

peekFrame

protected LinkedList peekFrame()

pop

protected Object pop()

popFrame

protected LinkedList popFrame()

push

protected void push(Object obj)

pushFrame

protected void pushFrame()

returnExpr

protected void returnExpr()

setXPathFactory

public void setXPathFactory(XPathFactory xpathFactory)
Set the Jaxen XPathFactory that constructs the XPath expression tree during the parse.

Parameters: xpathFactory the factory to use during the parse

stackSize

protected int stackSize()

startAbsoluteLocationPath

public void startAbsoluteLocationPath()

startAdditiveExpr

public void startAdditiveExpr()

startAllNodeStep

public void startAllNodeStep(int axis)

startAndExpr

public void startAndExpr()

startCommentNodeStep

public void startCommentNodeStep(int axis)

startEqualityExpr

public void startEqualityExpr()

startFilterExpr

public void startFilterExpr()

startFunction

public void startFunction(String prefix, String functionName)

startMultiplicativeExpr

public void startMultiplicativeExpr()

startNameStep

public void startNameStep(int axis, String prefix, String localName)

startOrExpr

public void startOrExpr()

startPathExpr

public void startPathExpr()

startPredicate

public void startPredicate()

startProcessingInstructionNodeStep

public void startProcessingInstructionNodeStep(int axis, String name)

startRelationalExpr

public void startRelationalExpr()

startRelativeLocationPath

public void startRelativeLocationPath()

startTextNodeStep

public void startTextNodeStep(int axis)

startUnaryExpr

public void startUnaryExpr()

startUnionExpr

public void startUnionExpr()

startXPath

public void startXPath()

variableReference

public void variableReference(String prefix, String variableName)