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,
ContextItemStaticInfo contextItemType)
Type-check the pattern.
|
boolean |
equals(Object other)
Determine whether this pattern is the same as another 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 |
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, convertToTypedPattern, getColumnNumber, getConfiguration, getContainerGranularity, getDefaultPriority, getDependencies, getHostLanguage, getLineNumber, getLocationProvider, getNodeKind, getNodeKindMask, getPackageData, getPublicId, getSystemId, isMotionless, make, matchesBeneathAnchor, promote, replaceCurrent, replaceSubExpression, selectNodes, setLineNumber, setOriginalText, setPackageData, setPriority, setSystemId, simplify
public BooleanExpressionPattern(Expression expression)
expression
- the expression to be evaluatedpublic int allocateSlots(SlotManager slotManager, int nextFree)
allocateSlots
in class Pattern
slotManager
- 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 Pattern
public Pattern analyze(ExpressionVisitor visitor, ContextItemStaticInfo contextItemType) throws XPathException
analyze
in class Pattern
visitor
- 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.XPathException
public boolean matches(Item item, XPathContext context)
matches
in class Pattern
item
- 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 Pattern
public int getFingerprint()
getFingerprint
in class Pattern
public String toString()
public boolean equals(Object other)
Copyright (c) 2004-2014 Saxonica Limited. All rights reserved.