public class WithParam
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static WithParam[] |
EMPTY_ARRAY |
Constructor and Description |
---|
WithParam() |
Modifier and Type | Method and Description |
---|---|
static WithParam[] |
copy(Expression parent,
WithParam[] params,
RebindingMap rebindings)
Static method to copy a set of parameters
|
static void |
exportParameters(WithParam[] params,
ExpressionPresenter out,
boolean tunnel)
Static method to export a set of parameters
|
static void |
gatherOperands(Expression parent,
WithParam[] params,
java.util.List<Operand> list)
Static method to gather the XPath expressions used in an array of WithParam parameters (add them to the supplied list)
|
int |
getEvaluationMode()
Get the evaluation mode of the variable
|
int |
getInstructionNameCode() |
SequenceType |
getRequiredType()
Get the required type of this variable
|
Expression |
getSelectExpression()
Get the expression to which this variable is bound
|
Operand |
getSelectOperand() |
Sequence<?> |
getSelectValue(XPathContext context)
Evaluate the variable.
|
int |
getSlotNumber()
Get the slot number allocated to this variable.
|
StructuredQName |
getVariableQName()
Get the name of this variable
|
boolean |
isTypeChecked()
Ask whether static type checking has been done
|
static void |
optimize(ExpressionVisitor visitor,
WithParam[] params,
ContextItemStaticInfo contextItemType)
Static method to optimize a set of with-param elements
|
void |
setRequiredType(SequenceType required)
Set the required type of this variable
|
void |
setSelectExpression(Expression parent,
Expression select)
Set the expression to which this variable is bound
|
void |
setSlotNumber(int s)
Set the slot number of this variable
|
void |
setTypeChecked(boolean checked)
Say whether this parameter will have been typechecked by the caller to ensure it satisfies
the required type, in which case the callee need not do a dynamic type check
|
void |
setVariableQName(StructuredQName s)
Set the name of the variable
|
static void |
simplify(WithParam[] params)
Static method to simplify a set of with-param elements
|
static void |
typeCheck(WithParam[] params,
ExpressionVisitor visitor,
ContextItemStaticInfo contextItemType)
Static method to typecheck a set of with-param elements
|
public static WithParam[] EMPTY_ARRAY
public void setSelectExpression(Expression parent, Expression select)
parent
- the parent expressionselect
- the initializing expressionpublic Expression getSelectExpression()
public Operand getSelectOperand()
public void setRequiredType(SequenceType required)
required
- the required typepublic SequenceType getRequiredType()
public int getSlotNumber()
public void setSlotNumber(int s)
s
- the slot number, that is, the position allocated to this variable on its stack framepublic void setVariableQName(StructuredQName s)
s
- the name of the variable (a QName)public StructuredQName getVariableQName()
public void setTypeChecked(boolean checked)
checked
- true if the caller has done static type checking against the required typepublic int getInstructionNameCode()
public static void simplify(WithParam[] params) throws XPathException
params
- the set of parameters to be simplifiedXPathException
- if a static error is foundpublic static void typeCheck(WithParam[] params, ExpressionVisitor visitor, ContextItemStaticInfo contextItemType) throws XPathException
params
- the set of parameters to be checkedvisitor
- the expression visitorcontextItemType
- static information about the context item type and existenceXPathException
- if a static error is foundpublic static void optimize(ExpressionVisitor visitor, WithParam[] params, ContextItemStaticInfo contextItemType) throws XPathException
params
- the set of parameters to be optimizedvisitor
- the expression visitorcontextItemType
- static information about the context item type and existenceXPathException
- if a static error is foundpublic int getEvaluationMode()
ExpressionTool
public static WithParam[] copy(Expression parent, WithParam[] params, RebindingMap rebindings)
parent
- the new parent expressionparams
- the parameters to be copiedpublic static void gatherOperands(Expression parent, WithParam[] params, java.util.List<Operand> list)
parent
- the containing expressionparams
- the set of with-param elements to be searchedlist
- the list to which the subexpressions will be addedpublic static void exportParameters(WithParam[] params, ExpressionPresenter out, boolean tunnel) throws XPathException
params
- the set of parameters to be exportedout
- the destination for the outputtunnel
- true if these are tunnel parametersXPathException
public Sequence<?> getSelectValue(XPathContext context) throws XPathException
context
- the XPath dynamic contextXPathException
- if evaluation of the select expression fails
with a dynamic errorpublic boolean isTypeChecked()
Copyright (c) 2004-2020 Saxonica Limited. All rights reserved.