Package net.sf.saxon.expr
Class UnionCastableFunction
java.lang.Object
net.sf.saxon.functions.AbstractFunction
net.sf.saxon.expr.UnionConstructorFunction
net.sf.saxon.expr.UnionCastableFunction
- All Implemented Interfaces:
Callable
,FunctionItem
,GroundedValue
,Item
,Sequence
Function to test castability to a union type
-
Field Summary
Fields inherited from class net.sf.saxon.expr.UnionConstructorFunction
allowEmpty, resolver, targetType
-
Constructor Summary
ConstructorsConstructorDescriptionUnionCastableFunction
(UnionType targetType, NamespaceResolver resolver, boolean allowEmpty) Create a cast expression to a union type -
Method Summary
Modifier and TypeMethodDescriptioncall
(XPathContext context, Sequence[] args) Invoke the functionGet the item type of the function itemGet the name of the function, or null if it is anonymousMethods inherited from class net.sf.saxon.expr.UnionConstructorFunction
cast, cast, getArity, getDescription, getNamespaceResolver, getOperandRole, getTargetType, isAllowEmpty
Methods inherited from class net.sf.saxon.functions.AbstractFunction
atomize, deepEqual40, deepEquals, effectiveBooleanValue, export, getAnnotations, getOperandRoles, getUnicodeStringValue, isArray, isMap, isTrustedResultType, makeNewContext, simplify, toShortString, typeCheck
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.sf.saxon.om.FunctionItem
getGenre, isSequenceVariadic
Methods inherited from interface net.sf.saxon.om.GroundedValue
asIterable, concatenate, containsNode, materialize
Methods inherited from interface net.sf.saxon.om.Item
getLength, getStringValue, head, isStreamed, itemAt, iterate, reduce, subsequence
Methods inherited from interface net.sf.saxon.om.Sequence
makeRepeatable
-
Constructor Details
-
UnionCastableFunction
Create a cast expression to a union type- Parameters:
targetType
- the union type that is the result of the castresolver
- namespace resolver in case the type is namespace-sensitiveallowEmpty
- true if an empty sequence may be supplied as input, converting to an empty sequence on output
-
-
Method Details
-
getFunctionItemType
Get the item type of the function item- Specified by:
getFunctionItemType
in interfaceFunctionItem
- Overrides:
getFunctionItemType
in classUnionConstructorFunction
- Returns:
- the function item's type
-
getFunctionName
Get the name of the function, or null if it is anonymous- Specified by:
getFunctionName
in interfaceFunctionItem
- Overrides:
getFunctionName
in classUnionConstructorFunction
- Returns:
- the function name, or null for an anonymous function
-
call
Invoke the function- Specified by:
call
in interfaceCallable
- Overrides:
call
in classUnionConstructorFunction
- Parameters:
context
- the XPath dynamic evaluation contextargs
- the actual arguments to be supplied- Returns:
- the result of invoking the function
- Throws:
XPathException
- if a dynamic error occurs within the function
-