Package org.htmlunit.xpath.axes
Class HasPositionalPredChecker
- java.lang.Object
-
- org.htmlunit.xpath.XPathVisitor
-
- org.htmlunit.xpath.axes.HasPositionalPredChecker
-
public class HasPositionalPredChecker extends XPathVisitor
-
-
Field Summary
Fields Modifier and Type Field Description private booleanm_hasPositionalPredprivate intm_predDepth
-
Constructor Summary
Constructors Constructor Description HasPositionalPredChecker()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static booleancheck(LocPathIterator path)Process the LocPathIterator to see if it contains variables or functions that may make it context dependent.booleanvisitFunction(Function func)Visit a function.booleanvisitPredicate(Expression pred)Visit a predicate within a location path.-
Methods inherited from class org.htmlunit.xpath.XPathVisitor
visitBinaryOperation, visitLocationPath, visitMatchPattern, visitNumberLiteral, visitStep, visitStringLiteral, visitUnaryOperation, visitUnionPath, visitUnionPattern
-
-
-
-
Method Detail
-
check
public static boolean check(LocPathIterator path)
Process the LocPathIterator to see if it contains variables or functions that may make it context dependent.- Parameters:
path- LocPathIterator that is assumed to be absolute, but needs checking.- Returns:
- true if the path is confirmed to be absolute, false if it may contain context dependencies.
-
visitFunction
public boolean visitFunction(Function func)
Visit a function.- Overrides:
visitFunctionin classXPathVisitor- Parameters:
func- The function reference object.- Returns:
- true if the sub expressions should be traversed.
-
visitPredicate
public boolean visitPredicate(Expression pred)
Visit a predicate within a location path. Note that there isn't a proper unique component for predicates, and that the expression will be called also for whatever type Expression is.- Overrides:
visitPredicatein classXPathVisitor- Parameters:
pred- The predicate object.- Returns:
- true if the sub expressions should be traversed.
-
-