public class BooleanExpressionPattern extends Pattern
| Constructor and Description |
|---|
BooleanExpressionPattern(Expression expression)
Create a BooleanExpressionPattern
|
| Modifier and Type | Method and Description |
|---|---|
int |
allocateSlots(SlotManager slotManager,
int nextFree)
Allocate slots to any variables used within the pattern
|
Pattern |
analyze(ExpressionVisitor visitor,
ExpressionVisitor.ContextItemType contextItemType)
Type-check the pattern.
|
boolean |
equals(Object other)
Determine whether this pattern is the same as another pattern
|
double |
getDefaultPriority()
Determine the default priority of this item type test when used on its own as a Pattern
|
int |
getFingerprint()
Determine the name fingerprint of nodes to which this pattern applies.
|
ItemType |
getItemType()
Get an Itemtype that all the items matching this pattern must satisfy
|
int |
getNodeKind()
Determine the types of nodes to which this pattern applies.
|
int |
hashCode()
Hashcode supporting equals()
|
Iterator<Expression> |
iterateSubExpressions()
Iterate over the subexpressions within this pattern
|
boolean |
matches(Item item,
XPathContext context)
Determine whether this Pattern matches the given item.
|
String |
toString()
Display the pattern for diagnostics
|
bindCurrent, getColumnNumber, getContainerGranularity, getDependencies, getExecutable, getHostLanguage, getLineNumber, getLocationProvider, getPublicId, getSystemId, isMotionless, make, matchesBeneathAnchor, promote, replaceCurrent, replaceSubExpression, selectNodes, setExecutable, setLineNumber, setOriginalText, setSystemId, simplifypublic BooleanExpressionPattern(Expression expression)
expression - the expression to be evaluatedpublic int allocateSlots(SlotManager slotManager, int nextFree)
allocateSlots in class PatternslotManager - holds details of the allocated slotsnextFree - the next slot that is free to be allocated @return the next slot that is free to be allocatedpublic Iterator<Expression> iterateSubExpressions()
iterateSubExpressions in class Patternpublic Pattern analyze(ExpressionVisitor visitor, ExpressionVisitor.ContextItemType contextItemType) throws XPathException
analyze in class Patternvisitor - the expression visitorcontextItemType - the type of the context item at the point where the pattern
is defined. Set to null if it is known that the context item is undefined.XPathExceptionpublic boolean matches(Item item, XPathContext context)
matches in class Patternitem - The item to be tested against the Patterncontext - The context in which the match is to take place. Only relevant if the pattern
uses variables, or contains calls on functions such as document() or key().public ItemType getItemType()
getItemType in class Patternpublic final double getDefaultPriority()
getDefaultPriority in class Patternpublic int getNodeKind()
getNodeKind in class Patternpublic int getFingerprint()
getFingerprint in class Patternpublic String toString()
public boolean equals(Object other)
Copyright (c) 2004-2013 Saxonica Limited. All rights reserved.