public class ListConstructorFunction extends AbstractFunction
Modifier and Type | Field and Description |
---|---|
protected boolean |
allowEmpty |
protected SimpleType |
memberType |
protected NamespaceResolver |
nsResolver |
protected ListType |
targetType |
Constructor and Description |
---|
ListConstructorFunction(ListType targetType,
NamespaceResolver resolver,
boolean allowEmpty)
Create the constructor function.
|
Modifier and Type | Method and Description |
---|---|
AtomicSequence |
call(XPathContext context,
Sequence[] args)
Invoke the function
|
int |
getArity()
Get the arity of the function
|
java.lang.String |
getDescription()
Get a description of this function for use in error messages.
|
FunctionItemType |
getFunctionItemType()
Get the item type of the function item
|
StructuredQName |
getFunctionName()
Get the name of the function, or null if it is anonymous
|
SimpleType |
getMemberType()
Get the list item type (member type)
|
ListType |
getTargetType()
Get the list type
|
boolean |
isAllowEmpty()
Ask whether an empty sequence is allowed
|
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
protected ListType targetType
protected NamespaceResolver nsResolver
protected boolean allowEmpty
protected SimpleType memberType
public ListConstructorFunction(ListType targetType, NamespaceResolver resolver, boolean allowEmpty) throws MissingComponentException
targetType
- the type to which the function will convert its inputresolver
- namespace resolver for use if the target type is namespace-sensitiveMissingComponentException
public ListType getTargetType()
public SimpleType getMemberType()
public boolean isAllowEmpty()
public FunctionItemType getFunctionItemType()
public StructuredQName getFunctionName()
public java.lang.String getDescription()
public int getArity()
public AtomicSequence call(XPathContext context, Sequence[] args) throws XPathException
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.