java.io.Serializable
, javax.xml.transform.SourceLocator
, Container
, Expression
, InstructionInfoProvider
public final class IdentityComparison extends BinaryExpression
operand0, operand1, operator
locationId, staticProperties
EVALUATE_METHOD, ITERATE_METHOD, PROCESS_METHOD
Constructor | Description |
---|---|
IdentityComparison(Expression p1,
int op,
Expression p2) |
Create an identity comparison identifying the two operands and the operator
|
Modifier and Type | Method | Description |
---|---|---|
boolean |
effectiveBooleanValue(XPathContext context) |
Get the effective boolean value of the expression.
|
Item |
evaluateItem(XPathContext context) |
Evaluate the expression
|
ItemType |
getItemType(TypeHierarchy th) |
Determine the data type of the expression
|
void |
setGenerateIdEmulation(boolean flag) |
Set flag to indicate different empty-sequence behavior when emulating
comparison of two generate-id's
|
Expression |
typeCheck(StaticContext env,
ItemType contextItemType) |
Type-check the expression
|
computeCardinality, computeSpecialProperties, display, displayOperator, equals, getOperands, getOperator, hashCode, isAssociative, isCommutative, isInverse, iterateSubExpressions, optimize, promote, replaceSubExpression, simplify
adoptChildExpression, checkPermittedContents, computeDependencies, computeStaticProperties, doPromotion, dynamicError, evaluateAsString, getCardinality, getColumnNumber, getConstructType, getDependencies, getExecutable, getHostLanguage, getImplementationMethod, getInstructionInfo, getIntrinsicDependencies, getLineNumber, getLocationId, getLocationProvider, getParentExpression, getPublicId, getSlotsUsed, getSpecialProperties, getSystemId, hasBadParentPointer, iterate, markTailFunctionCalls, process, resetStaticProperties, setLocationId, setParentExpression, setParentExpression, suppressValidation, typeError
public IdentityComparison(Expression p1, int op, Expression p2)
p1
- the left-hand operandop
- the operator, as a token returned by the Tokenizer (e.g. Token.LT)p2
- the right-hand operandpublic void setGenerateIdEmulation(boolean flag)
public Expression typeCheck(StaticContext env, ItemType contextItemType) throws XPathException
typeCheck
in interface Expression
typeCheck
in class BinaryExpression
env
- the static context of the expressioncontextItemType
- the static type of "." at the point where this expression is invoked.
The parameter is set to null if it is known statically that the context item will be undefined.
If the type of the context item is not known statically, the argument is set to
Type.ITEM_TYPE
StaticError
- if an error is discovered during this phase
(typically a type error)XPathException
public Item evaluateItem(XPathContext context) throws XPathException
evaluateItem
in interface Expression
evaluateItem
in class ComputedExpression
context
- The context in which the expression is to be evaluatedXPathException
- if any dynamic error occurs evaluating the
expressionpublic boolean effectiveBooleanValue(XPathContext context) throws XPathException
ComputedExpression
effectiveBooleanValue
in interface Expression
effectiveBooleanValue
in class ComputedExpression
context
- The context in which the expression is to be evaluatedXPathException
- if any dynamic error occurs evaluating the
expressionpublic ItemType getItemType(TypeHierarchy th)
th
-