| 
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Objectnet.sf.saxon.expr.Expression
net.sf.saxon.expr.FunctionCall
net.sf.saxon.expr.UserFunctionCall
public class UserFunctionCall
This class represents a call to a user-defined function in the stylesheet or query.
| Field Summary | 
|---|
| Fields inherited from class net.sf.saxon.expr.Expression | 
|---|
EVALUATE_METHOD, ITERATE_METHOD, PROCESS_METHOD | 
| Constructor Summary | |
|---|---|
UserFunctionCall()
 | 
|
| Method Summary | |
|---|---|
 void | 
checkArguments(StaticContext env)
Method called during the type checking phase  | 
 void | 
checkFunctionCall(UserFunction compiledFunction,
                  StaticContext env)
Check the function call against the declared function signature  | 
 void | 
computeArgumentEvaluationModes()
 | 
 int | 
computeCardinality()
Determine the cardinality of the result  | 
 void | 
display(int level,
        PrintStream out,
        Configuration config)
Diagnostic print of expression structure.  | 
 ValueRepresentation | 
dynamicCall(ValueRepresentation[] suppliedArguments,
            XPathContext context)
Call the function dynamically.  | 
 Item | 
evaluateItem(XPathContext c)
Call the function, returning the value as an item.  | 
 int[] | 
getArgumentEvaluationModes()
Get the evaluation modes that have been determined for each of the arguments  | 
 Expression[] | 
getArguments()
Get the arguments (the expressions supplied in the function call)  | 
 UserFunction | 
getFunction()
Get the function that is being called by this function call  | 
 int | 
getImplementationMethod()
An implementation of Expression must provide at least one of the methods evaluateItem(), iterate(), or process().  | 
 InstructionInfo | 
getInstructionInfo()
Get diagnostic information about this expression  | 
 int | 
getIntrinsicDependencies()
Determine the intrinsic dependencies of an expression, that is, those which are not derived from the dependencies of its subexpressions.  | 
 ItemType | 
getItemType(TypeHierarchy th)
Determine the data type of the expression, if possible  | 
 boolean | 
isConfirmed()
Determine whether this function call is confirmed  | 
 boolean | 
isRecursiveTailCall()
Determine whether this is a recursive tail call  | 
 boolean | 
isTailCall()
Determine whether this is a tail call (not necessarily a recursive tail call)  | 
 SequenceIterator | 
iterate(XPathContext c)
Call the function, returning an iterator over the results.  | 
 int | 
markTailFunctionCalls(int nameCode,
                      int arity)
Mark tail-recursive calls on stylesheet functions.  | 
 Expression | 
optimize(Optimizer opt,
         StaticContext env,
         ItemType contextItemType)
Perform optimisation of an expression and its subexpressions.  | 
 Expression | 
preEvaluate(StaticContext env)
Pre-evaluate a function at compile time.  | 
 void | 
process(XPathContext context)
Process the function call in push mode  | 
 void | 
setConfirmed(boolean conf)
Set this function as confirmed (the function being called is known to exist) or not  | 
 void | 
setFunction(UserFunction compiledFunction,
            StaticContext env)
Create the reference to the function to be called, and validate for consistency  | 
 void | 
setStaticType(SequenceType type)
Set the static type  | 
 Expression | 
simplify(StaticContext env)
Simplify the function call  | 
 Expression | 
typeCheck(StaticContext env,
          ItemType contextItemType)
Type-check the expression.  | 
| Methods inherited from class net.sf.saxon.expr.FunctionCall | 
|---|
getDisplayName, getFunctionNameCode, getNumberOfArguments, iterateSubExpressions, promote, replaceSubExpression, setArguments, setFunctionNameCode | 
| Methods inherited from class java.lang.Object | 
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public UserFunctionCall()
| Method Detail | 
|---|
public void setStaticType(SequenceType type)
public void setFunction(UserFunction compiledFunction,
                        StaticContext env)
                 throws XPathException
XPathException
public void checkFunctionCall(UserFunction compiledFunction,
                              StaticContext env)
                       throws XPathException
XPathExceptionpublic UserFunction getFunction()
public void setConfirmed(boolean conf)
public boolean isConfirmed()
public boolean isTailCall()
public boolean isRecursiveTailCall()
public Expression[] getArguments()
getArguments in class FunctionCall
public void checkArguments(StaticContext env)
                    throws XPathException
XPathExceptionpublic int[] getArgumentEvaluationModes()
public Expression preEvaluate(StaticContext env)
preEvaluate in class FunctionCallpublic ItemType getItemType(TypeHierarchy th)
getItemType in class Expressionth - 
public int getIntrinsicDependencies()
Expression
getIntrinsicDependencies in class Expressionpublic int computeCardinality()
public Expression simplify(StaticContext env)
                    throws XPathException
simplify in class FunctionCallXPathException - if an error is discovered during expression
     rewriting
public Expression typeCheck(StaticContext env,
                            ItemType contextItemType)
                     throws XPathException
FunctionCall
typeCheck in class FunctionCallenv - 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 Expression optimize(Optimizer opt,
                           StaticContext env,
                           ItemType contextItemType)
                    throws XPathException
FunctionCallThis method is called after all references to functions and variables have been resolved to the declaration of the function or variable, and after all type checking has been done.
optimize in class FunctionCallopt - the optimizer in use. This provides access to supporting functions; it also allows
                        different optimization strategies to be used in different circumstances.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)
XPathExceptionpublic void computeArgumentEvaluationModes()
public int markTailFunctionCalls(int nameCode,
                                 int arity)
markTailFunctionCalls in class Expressionpublic int getImplementationMethod()
Expression
getImplementationMethod in class Expression
public Item evaluateItem(XPathContext c)
                  throws XPathException
evaluateItem in interface EvaluableItemevaluateItem in class Expressionc - 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 SequenceIterableiterate in class Expressionc - supplies the context for evaluation
XPathException - if any dynamic error occurs evaluating the
     expression
public void process(XPathContext context)
             throws XPathException
process in class Expressioncontext - 
XPathException
public ValueRepresentation dynamicCall(ValueRepresentation[] suppliedArguments,
                                       XPathContext context)
                                throws XPathException
XPathException
public void display(int level,
                    PrintStream out,
                    Configuration config)
Expression
display in class FunctionCalllevel - indentation level for this expressionout - Output destinationpublic InstructionInfo getInstructionInfo()
getInstructionInfo in interface InstructionInfoProvidergetInstructionInfo in class Expression
  | 
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||