public class WithParam extends 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)
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,
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
|
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
|
static void |
promoteParams(WithParam[] params,
PromotionOffer offer)
Static method to do expression promotion on 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
|
static void |
setSlotNumbers(WithParam[] params) |
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 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 static void promoteParams(WithParam[] params, PromotionOffer offer) throws XPathException
params
- the set of parameters to be be investigated for promotionoffer
- the promotion offer to be passed to subexpressionsXPathException
- if a static error is foundpublic static void setSlotNumbers(WithParam[] params)
public int getEvaluationMode()
ExpressionTool
public static WithParam[] copy(Expression parent, WithParam[] params)
parent
- the new parent expressionparams
- the parameters to be copiedpublic static void gatherOperands(Expression parent, WithParam[] params, 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)
params
- the set of parameters to be exportedout
- the destination for the outputtunnel
- true if these are tunnel parameterspublic 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-2014 Saxonica Limited. All rights reserved.