|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--net.sf.saxon.expr.ComputedExpression
|
+--net.sf.saxon.expr.FunctionCall
|
+--net.sf.saxon.expr.UserFunctionCall
This class represents a call to a function defined in the stylesheet or query. It is used for all user-defined functions in XQuery, and for a limited class of user-defined functions in XSLT: those that can be reduced to the evaluation of a single expression.
| Nested Class Summary | |
static class |
UserFunctionCall.FunctionCallPackage
Inner class used to wrap up the set of actual arguments to a tail-recursive call of the containing function. |
| Field Summary |
| Fields inherited from class net.sf.saxon.expr.FunctionCall |
argument |
| Fields inherited from class net.sf.saxon.expr.ComputedExpression |
lineNumber, NO_ARGUMENTS, staticProperties |
| Constructor Summary | |
UserFunctionCall()
|
|
| Method Summary | |
void |
checkArguments(StaticContext env)
Method called during the type checking phase |
int |
computeCardinality()
Determine the cardinality of the result |
void |
display(int level,
NamePool pool)
Diagnostic print of expression structure. |
Item |
evaluateItem(XPathContext c)
Call the function, returning the value as an item. |
int |
getFingerprint()
Get the fingerprint representing the name of the function |
ItemType |
getItemType()
Determine the data type of the expression, if possible |
java.lang.String |
getName()
Get the name of the function. |
SequenceIterator |
iterate(XPathContext c)
Call the function, returning an iterator over the results. |
boolean |
markTailFunctionCalls()
Mark tail-recursive calls on stylesheet functions. |
Expression |
preEvaluate(StaticContext env)
Pre-evaluate a function at compile time. |
void |
setFingerprint(int fingerprint)
Set the fingerprint representing the name of the function |
void |
setFunction(FunctionSignature sourceFunction,
CallableFunction compiledFunction)
Create the reference to the function to be called, and validate for consistency |
void |
setStaticType(SequenceType type)
Set the static type |
Expression |
simplify()
Simplify the function call |
| Methods inherited from class net.sf.saxon.expr.FunctionCall |
analyze, checkArgumentCount, getNumberOfArguments, getSubExpressions, promote, setArguments, simplifyArguments |
| Methods inherited from class net.sf.saxon.expr.ComputedExpression |
computeDependencies, computeSpecialProperties, computeStaticProperties, dynamicError, effectiveBooleanValue, evaluateAsString, getCardinality, getDependencies, getIntrinsicDependencies, getLineNumber, getSourceLocator, getSpecialProperties, setLineNumber, typeError |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public UserFunctionCall()
| Method Detail |
public void setFingerprint(int fingerprint)
public int getFingerprint()
public void setStaticType(SequenceType type)
public void setFunction(FunctionSignature sourceFunction,
CallableFunction compiledFunction)
throws XPathException
XPathExceptionpublic java.lang.String getName()
getName in class FunctionCall
public void checkArguments(StaticContext env)
throws XPathException
checkArguments in class FunctionCallXPathExceptionpublic Expression preEvaluate(StaticContext env)
preEvaluate in class FunctionCallpublic ItemType getItemType()
public int computeCardinality()
computeCardinality in class ComputedExpression
public Expression simplify()
throws XPathException
simplify in interface Expressionsimplify in class FunctionCallXPathException - if an error is discovered during expression
rewritingpublic boolean markTailFunctionCalls()
markTailFunctionCalls in class ComputedExpression
public Item evaluateItem(XPathContext c)
throws XPathException
evaluateItem in interface ExpressionevaluateItem in class ComputedExpressionc - The context in which the expression is to be evaluated
XPathException - if any dynamic error occurs evaluating the
expression
public SequenceIterator iterate(XPathContext c)
throws XPathException
iterate in interface Expressioniterate in class ComputedExpressionc - supplies the context for evaluation
XPathException - if any dynamic error occurs evaluating the
expression
public void display(int level,
NamePool pool)
Expression
display in interface Expressiondisplay in class FunctionCalllevel - indentation level for this expression
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||