public abstract class PredicatedNodeTest extends NodeTest implements SubContextList
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
m_foundLast
This is true if nextNode returns null.
|
protected LocPathIterator |
m_lpi
The owning location path iterator.
|
protected int |
m_predCount |
protected int[] |
m_proximityPositions
An array of counts that correspond to the number of predicates the step contains.
|
m_name, m_whatToShow, SCORE_NODETEST, SCORE_NONE, SCORE_NSWILD, SCORE_OTHER, SCORE_QNAME, SHOW_BYFUNCTION, WILD| Modifier and Type | Method and Description |
|---|---|
short |
acceptNode(int n)
Test whether a specified node is visible in the logical view of a TreeWalker or NodeIterator.
|
void |
callPredicateVisitors(XPathVisitor visitor)
This will traverse the heararchy, calling the visitor for each member.
|
boolean |
canTraverseOutsideSubtree()
Tell if this expression or it's subexpressions can traverse outside the current subtree.
|
Object |
clone() |
protected void |
countProximityPosition(int i)
Count forward one proximity position.
|
boolean |
deepEquals(Expression expr)
Compare this object with another object and see if they are equal, include the sub heararchy.
|
abstract int |
getLastPos(XPathContext xctxt)
Get the number of nodes in the node list, which, in the XSLT 1 based counting system, is the
last index position.
|
Expression |
getPredicate(int index)
Get a predicate expression at the given index.
|
int |
getPredicateCount()
Get the number of predicates that this walker has.
|
int |
getProximityPosition()
Get the current sub-context position.
|
protected int |
getProximityPosition(int predicateIndex)
Get the current sub-context position.
|
int |
getProximityPosition(XPathContext xctxt)
Get the current sub-context position.
|
protected void |
initPredicateInfo(Compiler compiler,
int opPos)
Init predicate info.
|
void |
initProximityPosition(int i)
Init the proximity position to zero for a forward axes.
|
boolean |
isReverseAxes()
Tells if this is a reverse axes.
|
protected String |
nodeToString(int n)
Diagnostics.
|
void |
resetProximityPositions()
Reset the proximity positions counts.
|
void |
setLocPathIterator(LocPathIterator li)
Set the location path iterator owner for this walker.
|
void |
setPredicateCount(int count)
Set the number of predicates that this walker has.
|
calcScore, callVisitors, execute, execute, execute, getLocalName, getNamespace, getNodeTypeTest, getStaticScore, getWhatToShow, initNodeTest, initNodeTest, setLocalName, setNamespace, setStaticScore, setWhatToShowasIterator, asNode, assertion, bool, error, execute, exprGetParent, exprSetParent, getColumnNumber, getExpressionOwner, getLineNumber, getPublicId, getSystemId, isSameClass, isStableNumber, numprotected int m_predCount
protected transient boolean m_foundLast
protected LocPathIterator m_lpi
protected transient int[] m_proximityPositions
public Object clone() throws CloneNotSupportedException
clone in class ObjectCloneNotSupportedExceptionpublic int getPredicateCount()
public void setPredicateCount(int count)
count - The number of predicates, which must be equal or less than the existing count.protected void initPredicateInfo(Compiler compiler, int opPos) throws TransformerException
compiler - The Compiler object that has information about this walker in the op map.opPos - The op code position of this location step.TransformerException - if anypublic Expression getPredicate(int index)
index - Index of the predicate.public int getProximityPosition()
public int getProximityPosition(XPathContext xctxt)
getProximityPosition in interface SubContextListxctxt - The XPath runtime context.public abstract int getLastPos(XPathContext xctxt)
getLastPos in interface SubContextListxctxt - The XPath runtime context.protected int getProximityPosition(int predicateIndex)
predicateIndex - The index of the predicate where the proximity should be taken from.public void resetProximityPositions()
public void initProximityPosition(int i)
i - The index into the m_proximityPositions array.protected void countProximityPosition(int i)
i - The index into the m_proximityPositions array, where the increment will occur.public boolean isReverseAxes()
protected String nodeToString(int n)
n - Node to give diagnostic information about, or null.public short acceptNode(int n)
n - The node to check to see if it passes the filter or not.public void setLocPathIterator(LocPathIterator li)
li - non-null reference to the owning location path iterator.public boolean canTraverseOutsideSubtree()
canTraverseOutsideSubtree in class Expressionpublic void callPredicateVisitors(XPathVisitor visitor)
visitor - The visitor whose appropriate method will be called.public boolean deepEquals(Expression expr)
deepEquals in class NodeTestexpr - Another expression object.Copyright © 2022–2023 HtmlUnit. All rights reserved.