|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.saxonica.functions.hof.AbstractFunctionItem
com.saxonica.functions.hof.CoercedFunction
public class CoercedFunction
A function item obtained by coercing a supplied function; this adds a wrapper to perform dynamic type checking of the arguments in any call, and type checking of the result.
| Field Summary |
|---|
| Fields inherited from interface net.sf.saxon.om.ValueRepresentation |
|---|
EMPTY_VALUE_ARRAY |
| Constructor Summary | |
|---|---|
CoercedFunction(FunctionItem targetFunction)
Create a CoercedFunction as a wrapper around a target function |
|
| Method Summary | |
|---|---|
static CoercedFunction |
coerce(FunctionItem suppliedFunction,
FunctionType requiredType,
RoleLocator role,
TypeCheckerEnvironment visitor)
Factory method to create a CoercedFunction with a given type, for a given targetFunction. |
int |
getArity()
Get the arity of the function |
FunctionItemType |
getFunctionItemType(TypeHierarchy th)
Get the item type of the function item |
StructuredQName |
getFunctionName()
Get the name of the function, or null if it is anonymous |
SequenceIterator |
invoke(SequenceIterator[] args,
XPathContext context)
Invoke the function |
void |
setArgumentConverter(int arg,
Expression converter)
Set the argument converter for one argument |
void |
setResultConverter(Expression converter)
Set the converter used to process the returned value |
void |
setStackFrameMap(SlotManager stackFrame)
Set the stack frame map identifying the arguments for conversion |
| Methods inherited from class com.saxonica.functions.hof.AbstractFunctionItem |
|---|
bind, curry, deepEquals, explain, getStringValue, getStringValueCS, getTypedValue, optimize, simplify, typeCheck |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CoercedFunction(FunctionItem targetFunction)
targetFunction - the function to be wrapped by a type-checking layer| Method Detail |
|---|
public void setArgumentConverter(int arg,
Expression converter)
arg - identifies the argument to be convertedconverter - the expression used to perform the conversionpublic void setResultConverter(Expression converter)
converter - the expression used to perform the conversionpublic void setStackFrameMap(SlotManager stackFrame)
stackFrame - public FunctionItemType getFunctionItemType(TypeHierarchy th)
th -
public StructuredQName getFunctionName()
public int getArity()
public SequenceIterator invoke(SequenceIterator[] args,
XPathContext context)
throws XPathException
args - the actual arguments to be suppliedcontext - the XPath dynamic evaluation context
XPathException
public static CoercedFunction coerce(FunctionItem suppliedFunction,
FunctionType requiredType,
RoleLocator role,
TypeCheckerEnvironment visitor)
throws XPathException
XPathException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||