public class ItemTypePattern extends Pattern
EFFECTIVE_BOOLEAN_VALUE, EVALUATE_METHOD, ITEM_FEED_METHOD, ITERATE_METHOD, MAX_COST, MAX_SEQUENCE_LENGTH, MAX_STRING_LENGTH, PROCESS_METHOD, staticProperties, UNBOUNDED_LOWER, UNBOUNDED_UPPER, UPDATE_METHOD, WATCH_METHOD
Constructor and Description |
---|
ItemTypePattern(ItemType test)
Create an ItemTypePattern that matches all items of a given type
|
Modifier and Type | Method and Description |
---|---|
protected int |
computeHashCode()
Hashcode supporting equals()
|
Pattern |
copy(RebindingMap rebindings)
Copy a pattern.
|
boolean |
equals(java.lang.Object other)
Determine whether this pattern is the same as another pattern
|
void |
export(ExpressionPresenter presenter)
Diagnostic print of expression structure.
|
ItemType |
getItemType()
Get an ItemType that all the items matching this pattern must satisfy
|
UType |
getUType()
Get a UType indicating which kinds of items this Pattern can match.
|
boolean |
matches(Item item,
XPathContext context)
Determine whether this Pattern matches the given Node.
|
java.lang.String |
reconstruct()
Display the pattern for diagnostics
|
allocateSlots, bindCurrent, convertToTypedPattern, effectiveBooleanValue, getDefaultPriority, getDependencies, getFingerprint, getHostLanguage, getOriginalText, handleDynamicError, isLiftable, isMotionless, isRecoverable, make, matchesBeneathAnchor, matchesCurrentGroup, optimize, patternContainsVariable, replaceCurrent, selectNodes, setOriginalText, setPriority, setRecoverable, simplify, toPattern, toShortString, toString, typeCheck
computeCardinality, evaluateAsString, evaluateItem, getImplementationMethod, iterate, process
addToPathMap, adoptChildExpression, allowExtractingCommonSubexpressions, checkedOperands, checkForUpdatingSubexpressions, checkPermittedContents, computeDependencies, computeSpecialProperties, computeStaticProperties, dynamicError, evaluatePendingUpdates, explain, getCardinality, getConfiguration, getCost, getEvaluationMethod, getExpressionName, getExtraProperty, getIntegerBounds, getInterpretedExpression, getIntrinsicDependencies, getLocalRetainedStaticContext, getLocation, getNetCost, getObjectName, getPackageData, getParentExpression, getProperties, getProperty, getRetainedStaticContext, getScopingExpression, getSlotsUsed, getSpecialProperties, getStaticBaseURI, getStaticBaseURIString, getStaticType, getStaticUType, getStreamerName, getTracingTag, hasCompatibleStaticContext, hashCode, hasSpecialProperty, hasVariableBinding, identityHashCode, implementsStaticTypeCheck, isCallOn, isEqual, isIdentical, isInstruction, isMultiThreaded, isStaticPropertiesKnown, isSubtreeExpression, isUpdatingExpression, isVacuousExpression, markTailFunctionCalls, operandList, operands, operandSparseList, optimizeChildren, prepareForStreaming, resetLocalStaticProperties, restoreParentPointers, setEvaluationMethod, setExtraProperty, setFiltered, setFlattened, setLocation, setParentExpression, setRetainedStaticContext, setRetainedStaticContextLocally, setRetainedStaticContextThoroughly, setStaticProperty, simplifyChildren, staticTypeCheck, suppressValidation, typeCheckChildren, typeError, unordered, verifyParentPointers
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
gatherProperties
public ItemTypePattern(ItemType test)
test
- the type that the items must satisfy for the pattern to matchpublic boolean matches(Item item, XPathContext context) throws XPathException
matches
in class Pattern
item
- The item to be tested against the Patterncontext
- The context in which the match is to take place.XPathException
- if an error occurs while matching the pattern (the caller will usually
treat this the same as a false result)public ItemType getItemType()
getItemType
in class Pattern
public UType getUType()
public java.lang.String reconstruct()
reconstruct
in class Pattern
public boolean equals(java.lang.Object other)
equals
in class Expression
other
- the other objectprotected int computeHashCode()
computeHashCode
in class Expression
public void export(ExpressionPresenter presenter) throws XPathException
Expression
export
in interface ExportAgent
export
in class Pattern
presenter
- the expression presenter used to display the structureXPathException
- if the export fails, for example if an expression is found that won't work
in the target environment.public Pattern copy(RebindingMap rebindings)
Copyright (c) 2004-2022 Saxonica Limited. All rights reserved.