Constructor and Description |
---|
Operand(Expression parentExpression,
Expression childExpression,
OperandRole role)
Create an operand object
|
Modifier and Type | Method and Description |
---|---|
void |
detachChild() |
Expression |
getChildExpression()
Get the expression used as the actual operand
|
OperandRole |
getOperandRole()
Get the operand role
|
Expression |
getParentExpression()
Get the parent expression of this operand
|
SequenceType |
getRequiredType()
Get the required type of the operand
|
OperandUsage |
getUsage()
Get the usage of the operand
|
boolean |
hasSameFocus()
Ask whether the child expression is evaluated with the same focus as its parent expression
|
boolean |
isEvaluatedRepeatedly()
Ask whether the operand is a higher-order operand, in the sense that the child expression
is evaluated repeatedly during a single evaluation of the parent expression
|
boolean |
isInChoiceGroup()
Ask whether the operand is a member of a choice group
|
Iterator<Operand> |
iterator()
Get a singleton iterator that returns this operand only
|
void |
optimize(ExpressionVisitor visitor,
ContextItemStaticInfo contextInfo) |
void |
setChildExpression(Expression childExpression)
Change the child expression used for this operand.
|
void |
setOperandRole(OperandRole role)
Set the operand role
|
boolean |
setsNewFocus()
Ask whether the child expression sets a new focus for evaluation of other operands
|
void |
setUsage(OperandUsage usage)
Set the usage of the operand
|
void |
typeCheck(ExpressionVisitor visitor,
ContextItemStaticInfo contextInfo) |
public Operand(Expression parentExpression, Expression childExpression, OperandRole role)
parentExpression
- the expression of which this is an operandchildExpression
- the actual expression used as the operandrole
- information about the role this operand plays within the parent expressionpublic Expression getParentExpression()
public Expression getChildExpression()
public void setChildExpression(Expression childExpression)
childExpression
- the new child expressionpublic void detachChild()
public OperandRole getOperandRole()
public void setOperandRole(OperandRole role)
role
- the operand rolepublic boolean setsNewFocus()
public boolean hasSameFocus()
public boolean isEvaluatedRepeatedly()
public OperandUsage getUsage()
public void setUsage(OperandUsage usage)
usage
- the operand usagepublic SequenceType getRequiredType()
public boolean isInChoiceGroup()
public Iterator<Operand> iterator()
public void typeCheck(ExpressionVisitor visitor, ContextItemStaticInfo contextInfo) throws XPathException
XPathException
public void optimize(ExpressionVisitor visitor, ContextItemStaticInfo contextInfo) throws XPathException
XPathException
Copyright (c) 2004-2014 Saxonica Limited. All rights reserved.