public class JaxenHandler extends Object implements XPathHandler
XPathHandler implementation capable
of building Jaxen expression trees which can walk various
different object models.| Modifier and Type | Field and Description |
|---|---|
protected boolean |
simplified |
protected LinkedList |
stack |
| Constructor and Description |
|---|
JaxenHandler()
Construct.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
addParameters(FunctionCallExpr function,
Iterator paramIter) |
protected void |
addPredicates(Predicated obj,
Iterator predIter) |
protected void |
addSteps(LocationPath locationPath,
Iterator stepIter) |
protected boolean |
canPop() |
void |
endAbsoluteLocationPath()
Receive notification of the end of an absolute location path expression.
|
void |
endAdditiveExpr(int operator)
Receive notification of the end of an additive ('+' or '-') expression.
|
void |
endAllNodeStep()
Receive notification of the end of a node() step.
|
void |
endAndExpr(boolean create)
Receive notification of the end of an 'and' expression.
|
void |
endCommentNodeStep()
Receive notification of the end of a comment() step.
|
void |
endEqualityExpr(int operator)
Receive notification of the end of an equality ('=' or '!=') expression.
|
void |
endFilterExpr()
Receive notification of the end of a filter expression.
|
void |
endFunction()
Receive notification of the end of a function call.
|
protected void |
endLocationPath() |
void |
endMultiplicativeExpr(int operator)
Receive notification of the start of a multiplicative ('*', 'div' or 'mod') expression.
|
void |
endNameStep()
Receive notification of the end of a NameStep
|
void |
endOrExpr(boolean create)
Receive notification of the end of an 'or' expression.
|
void |
endPathExpr()
Receive notification of the end of a path expression.
|
void |
endPredicate()
Receive notification of the end of a predicate.
|
void |
endProcessingInstructionNodeStep()
Receive notification of the end of a processing-instruction(...) step.
|
void |
endRelationalExpr(int operator)
Receive notification of the start of a relational ('<', '>', '<=', or '>=') expression.
|
void |
endRelativeLocationPath()
Receive notification of the end of a relative location path expression.
|
protected void |
endStep() |
void |
endTextNodeStep()
Receive notification of the end of a text() step.
|
void |
endUnaryExpr(int operator)
Receive notification of the end of a unary ('+' or '-') expression.
|
void |
endUnionExpr(boolean create)
Receive notification of the end of a union ('|') expression.
|
void |
endXPath()
Receive notification of the end of an XPath expression parse.
|
XPathExpr |
getXPathExpr()
Retrieve the simplified Jaxen XPath expression tree.
|
XPathExpr |
getXPathExpr(boolean shouldSimplify)
Retrieve the Jaxen XPath expression tree, optionally
simplified.
|
XPathFactory |
getXPathFactory()
Retrieve the Jaxen
XPathFactory used
during the parse to construct the XPath expression tree. |
void |
literal(String literal)
Receive notification of a literal expression.
|
void |
number(double number)
Receive notification of a number expression.
|
void |
number(int number)
Receive notification of a number expression.
|
protected LinkedList |
peekFrame() |
protected Object |
pop() |
protected LinkedList |
popFrame() |
protected void |
push(Object obj) |
protected void |
pushFrame() |
protected void |
returnExpr() |
void |
setXPathFactory(XPathFactory xpathFactory)
Set the Jaxen
XPathFactory to use
during the parse to construct the XPath expression tree. |
protected int |
stackSize() |
void |
startAbsoluteLocationPath()
Receive notification of the start of an absolute location path expression.
|
void |
startAdditiveExpr()
Receive notification of the start of an additive ('+' or '-') expression.
|
void |
startAllNodeStep(int axis)
Receive notification of the start of a node() step.
|
void |
startAndExpr()
Receive notification of the start of an 'and' expression.
|
void |
startCommentNodeStep(int axis)
Receive notification of the start of a comment() step.
|
void |
startEqualityExpr()
Receive notification of the start of an equality ('=' or '!=') expression.
|
void |
startFilterExpr()
Receive notification of the start of a filter expression.
|
void |
startFunction(String prefix,
String functionName)
Receive notification of a function call.
|
void |
startMultiplicativeExpr()
Receive notification of the start of a multiplicative ('*', 'div' or 'mod') expression.
|
void |
startNameStep(int axis,
String prefix,
String localName)
Receive notification of the start of a name step.
|
void |
startOrExpr()
Receive notification of the start of an 'or' expression.
|
void |
startPathExpr()
Receive notification of the start of a path expression.
|
void |
startPredicate()
Receive notification of the start of a predicate.
|
void |
startProcessingInstructionNodeStep(int axis,
String name)
Receive notification of the start of a processing-instruction(...) step.
|
void |
startRelationalExpr()
Receive notification of the start of a relational ('<', '>', '<=', or '>=') expression.
|
void |
startRelativeLocationPath()
Receive notification of the start of a relative location path expression.
|
void |
startTextNodeStep(int axis)
Receive notification of the start of a text() step.
|
void |
startUnaryExpr()
Receive notification of the start of a unary ('+' or '-') expression.
|
void |
startUnionExpr()
Receive notification of the start of a union ('|') expression.
|
void |
startXPath()
Receive notification of the start of an XPath expression parse.
|
void |
variableReference(String prefix,
String variableName)
Receive notification of a variable-reference expression.
|
protected boolean simplified
protected LinkedList stack
public void setXPathFactory(XPathFactory xpathFactory)
XPathFactory to use
during the parse to construct the XPath expression tree.xpathFactory - The factory to use during the parse.public XPathFactory getXPathFactory()
XPathFactory used
during the parse to construct the XPath expression tree.XPathFactory used during the parse.public XPathExpr getXPathExpr()
This method is only valid once XPathReader.parse(...)
successfully returned.
public XPathExpr getXPathExpr(boolean shouldSimplify)
This method is only valid once XPathReader.parse(...)
successfully returned.
public void startXPath()
throws JaxenException
XPathHandlerstartXPath in interface XPathHandlerJaxenExceptionpublic void endXPath()
throws JaxenException
XPathHandlerendXPath in interface XPathHandlerJaxenExceptionpublic void startPathExpr()
throws JaxenException
XPathHandlerstartPathExpr in interface XPathHandlerJaxenExceptionpublic void endPathExpr()
throws JaxenException
XPathHandlerendPathExpr in interface XPathHandlerJaxenExceptionpublic void startAbsoluteLocationPath()
throws JaxenException
XPathHandlerstartAbsoluteLocationPath in interface XPathHandlerJaxenExceptionpublic void endAbsoluteLocationPath()
throws JaxenException
XPathHandlerendAbsoluteLocationPath in interface XPathHandlerJaxenExceptionpublic void startRelativeLocationPath()
throws JaxenException
XPathHandlerstartRelativeLocationPath in interface XPathHandlerJaxenExceptionpublic void endRelativeLocationPath()
throws JaxenException
XPathHandlerendRelativeLocationPath in interface XPathHandlerJaxenExceptionprotected void endLocationPath()
throws JaxenException
JaxenExceptionprotected void addSteps(LocationPath locationPath, Iterator stepIter)
public void startNameStep(int axis,
String prefix,
String localName)
throws JaxenException
XPathHandlerstartNameStep in interface XPathHandleraxis - The axis of this step.prefix - The namespace prefix for the name to test,
or the empty-string if no prefix is specified.localName - The local part of the name to test.JaxenExceptionpublic void endNameStep()
throws JaxenException
XPathHandlerendNameStep in interface XPathHandlerJaxenExceptionpublic void startTextNodeStep(int axis)
throws JaxenException
XPathHandlerstartTextNodeStep in interface XPathHandleraxis - The axis of this step.JaxenExceptionpublic void endTextNodeStep()
throws JaxenException
XPathHandlerendTextNodeStep in interface XPathHandlerJaxenExceptionpublic void startCommentNodeStep(int axis)
throws JaxenException
XPathHandlerstartCommentNodeStep in interface XPathHandleraxis - The axis of this step.JaxenExceptionpublic void endCommentNodeStep()
throws JaxenException
XPathHandlerendCommentNodeStep in interface XPathHandlerJaxenExceptionpublic void startAllNodeStep(int axis)
throws JaxenException
XPathHandlerstartAllNodeStep in interface XPathHandleraxis - The axis of this step.JaxenExceptionpublic void endAllNodeStep()
throws JaxenException
XPathHandlerendAllNodeStep in interface XPathHandlerJaxenExceptionpublic void startProcessingInstructionNodeStep(int axis,
String name)
throws JaxenException
XPathHandlerstartProcessingInstructionNodeStep in interface XPathHandleraxis - The axis of this step.name - The name of the processing-instruction, of
the empty-string if none is specified.JaxenExceptionpublic void endProcessingInstructionNodeStep()
throws JaxenException
XPathHandlerendProcessingInstructionNodeStep in interface XPathHandlerJaxenExceptionprotected void endStep()
public void startPredicate()
throws JaxenException
XPathHandlerstartPredicate in interface XPathHandlerJaxenExceptionpublic void endPredicate()
throws JaxenException
XPathHandlerendPredicate in interface XPathHandlerJaxenExceptionpublic void startFilterExpr()
throws JaxenException
XPathHandlerstartFilterExpr in interface XPathHandlerJaxenExceptionpublic void endFilterExpr()
throws JaxenException
XPathHandlerendFilterExpr in interface XPathHandlerJaxenExceptionprotected void addPredicates(Predicated obj, Iterator predIter)
protected void returnExpr()
public void startOrExpr()
throws JaxenException
XPathHandlerstartOrExpr in interface XPathHandlerJaxenExceptionpublic void endOrExpr(boolean create)
throws JaxenException
XPathHandlerendOrExpr in interface XPathHandlercreate - Flag that indicates if this expression
should truly be instantiated, or if it was just
a pass-through, based upon the grammar productions.JaxenExceptionpublic void startAndExpr()
throws JaxenException
XPathHandlerstartAndExpr in interface XPathHandlerJaxenExceptionpublic void endAndExpr(boolean create)
throws JaxenException
XPathHandlerendAndExpr in interface XPathHandlercreate - Flag that indicates if this expression
should truly be instantiated, or if it was just
a pass-through, based upon the grammar productions.JaxenExceptionpublic void startEqualityExpr()
throws JaxenException
XPathHandlerstartEqualityExpr in interface XPathHandlerJaxenExceptionpublic void endEqualityExpr(int operator)
throws JaxenException
XPathHandlerendEqualityExpr in interface XPathHandlerJaxenExceptionpublic void startRelationalExpr()
throws JaxenException
XPathHandlerstartRelationalExpr in interface XPathHandlerJaxenExceptionpublic void endRelationalExpr(int operator)
throws JaxenException
XPathHandlerendRelationalExpr in interface XPathHandlerJaxenExceptionpublic void startAdditiveExpr()
throws JaxenException
XPathHandlerstartAdditiveExpr in interface XPathHandlerJaxenExceptionpublic void endAdditiveExpr(int operator)
throws JaxenException
XPathHandlerendAdditiveExpr in interface XPathHandlerJaxenExceptionpublic void startMultiplicativeExpr()
throws JaxenException
XPathHandlerstartMultiplicativeExpr in interface XPathHandlerJaxenExceptionpublic void endMultiplicativeExpr(int operator)
throws JaxenException
XPathHandlerendMultiplicativeExpr in interface XPathHandlerJaxenExceptionpublic void startUnaryExpr()
throws JaxenException
XPathHandlerstartUnaryExpr in interface XPathHandlerJaxenExceptionpublic void endUnaryExpr(int operator)
throws JaxenException
XPathHandlerendUnaryExpr in interface XPathHandlerJaxenExceptionpublic void startUnionExpr()
throws JaxenException
XPathHandlerstartUnionExpr in interface XPathHandlerJaxenExceptionpublic void endUnionExpr(boolean create)
throws JaxenException
XPathHandlerendUnionExpr in interface XPathHandlercreate - Flag that indicates if this expression
should truly be instantiated, or if it was just
a pass-through, based upon the grammar productions.JaxenExceptionpublic void number(int number)
throws JaxenException
XPathHandlernumber in interface XPathHandlernumber - The number value.JaxenExceptionpublic void number(double number)
throws JaxenException
XPathHandlernumber in interface XPathHandlernumber - The number value.JaxenExceptionpublic void literal(String literal) throws JaxenException
XPathHandlerliteral in interface XPathHandlerliteral - The string literal value.JaxenExceptionpublic void variableReference(String prefix, String variableName) throws JaxenException
XPathHandlervariableReference in interface XPathHandlerprefix - The ns-uri prefix of the variable.variableName - The name of the variable.JaxenExceptionpublic void startFunction(String prefix, String functionName) throws JaxenException
XPathHandlerstartFunction in interface XPathHandlerprefix - The ns-uri prefix of the function.functionName - The name of the function.JaxenExceptionpublic void endFunction()
throws JaxenException
XPathHandlerendFunction in interface XPathHandlerJaxenExceptionprotected void addParameters(FunctionCallExpr function, Iterator paramIter)
protected int stackSize()
protected void push(Object obj)
protected Object pop()
protected boolean canPop()
protected void pushFrame()
protected LinkedList popFrame()
protected LinkedList peekFrame()
Copyright © 2013. All Rights Reserved.