public class UnionCastableFunction extends UnionConstructorFunction
allowEmpty, resolver, targetType
Constructor and Description |
---|
UnionCastableFunction(UnionType targetType,
NamespaceResolver resolver,
boolean allowEmpty)
Create a cast expression to a union type
|
Modifier and Type | Method and Description |
---|---|
BooleanValue |
call(XPathContext context,
Sequence[] args)
Invoke the function
|
FunctionItemType |
getFunctionItemType()
Get the item type of the function item
|
StructuredQName |
getFunctionName()
Get the name of the function, or null if it is anonymous
|
cast, cast, getArity, getDescription, getNamespaceResolver, getOperandRole, getTargetType, isAllowEmpty
atomize, deepEquals, effectiveBooleanValue, export, getAnnotations, getOperandRoles, getStringValue, getStringValueCS, isArray, isMap, isTrustedResultType, makeNewContext, simplify, typeCheck
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
argumentArray, getGenre, toShortString
getLength, head, isStreamed, itemAt, iterate, iterator, reduce, subsequence, toGroundedValue
asIterable, materialize
makeRepeatable
public UnionCastableFunction(UnionType targetType, NamespaceResolver resolver, boolean allowEmpty)
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 outputpublic FunctionItemType getFunctionItemType()
getFunctionItemType
in interface Function
getFunctionItemType
in class UnionConstructorFunction
public StructuredQName getFunctionName()
getFunctionName
in interface Function
getFunctionName
in class UnionConstructorFunction
public BooleanValue call(XPathContext context, Sequence[] args) throws XPathException
call
in interface Callable
call
in interface Function
call
in class UnionConstructorFunction
context
- the XPath dynamic evaluation contextargs
- the actual arguments to be suppliedXPathException
- if a dynamic error occurs within the functionCopyright (c) 2004-2020 Saxonica Limited. All rights reserved.