public class BooleanFn extends SystemFunction
| Constructor and Description |
|---|
BooleanFn() |
| Modifier and Type | Method and Description |
|---|---|
BooleanValue |
call(XPathContext c,
Sequence[] arguments)
Call the Callable.
|
java.lang.String |
getCompilerName()
Get the (local) name of a class that can be used to generate bytecode for this
system function
|
java.lang.String |
getStreamerName()
Get a name that identifies the class that can be used to evaluate this function
in streaming mode, that is, supplying one item or event at a time as it is
delivered by the parser.
|
Expression |
makeFunctionCall(Expression[] arguments)
Make an expression that either calls this function, or that is equivalent to a call
on this function
|
static Expression |
rewriteEffectiveBooleanValue(Expression exp,
ExpressionVisitor visitor,
ContextItemStaticInfo contextItemType)
Optimize an expression whose effective boolean value is required.
|
void |
supplyTypeInformation(ExpressionVisitor visitor,
ContextItemStaticInfo contextItemType,
Expression[] arguments)
Method called during static type checking.
|
dependsOnContextItem, dynamicCall, equals, export, exportAdditionalArguments, exportAttributes, fixArguments, getArity, getCardinality, getContextNode, getDescription, getDetails, getErrorCodeForTypeErrors, getFunctionItemType, getFunctionName, getIntegerBounds, getNetCost, getOperandRoles, getRequiredType, getResultItemType, getResultItemType, getRetainedStaticContext, getSpecialProperties, getStaticBaseUriString, getUniStringArg, hashCode, importAttributes, isSequenceVariadic, isTrustedResultType, makeCall, makeFunction, makeOptimizedFunctionCall, resultIfEmpty, setArity, setDetails, setRetainedStaticContext, toShortString, toString, typeCheckCalleratomize, deepEquals, effectiveBooleanValue, getAnnotations, getUnicodeStringValue, isArray, isMap, makeNewContext, simplify, typeCheckclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetLength, getStringValue, head, isStreamed, itemAt, iterate, reduce, subsequenceasIterable, concatenate, containsNode, materializemakeRepeatablepublic void supplyTypeInformation(ExpressionVisitor visitor, ContextItemStaticInfo contextItemType, Expression[] arguments) throws XPathException
SystemFunctionsupplyTypeInformation in class SystemFunctionvisitor - an expression visitor, providing access to the static context and configurationcontextItemType - information about whether the context item is set, and what its type isarguments - the expressions appearing as arguments in the function callXPathException - if an error is detectedpublic static Expression rewriteEffectiveBooleanValue(Expression exp, ExpressionVisitor visitor, ContextItemStaticInfo contextItemType) throws XPathException
exp - the expression whose EBV is to be evaluatedvisitor - an expression visitorcontextItemType - the type of the context item for this expressionXPathException - if static errors are foundpublic BooleanValue call(XPathContext c, Sequence[] arguments) throws XPathException
Callablec - the dynamic evaluation contextarguments - the values of the arguments, supplied as Sequences.
Generally it is advisable, if calling iterate() to process a supplied sequence, to
call it only once; if the value is required more than once, it should first be converted
to a GroundedValue by calling the utility method
SequenceTool.toGroundedValue().
If the expected value is a single item, the item should be obtained by calling
Sequence.head(): it cannot be assumed that the item will be passed as an instance of
Item or AtomicValue.
It is the caller's responsibility to perform any type conversions required to convert arguments to the type expected by the callee. An exception is where this Callable is explicitly an argument-converting wrapper around the original Callable.
XPathException - if a dynamic error occurs during the evaluation of the expressionpublic Expression makeFunctionCall(Expression[] arguments)
SystemFunctionmakeFunctionCall in class SystemFunctionarguments - the supplied arguments to the function callpublic java.lang.String getCompilerName()
SystemFunctiongetCompilerName in class SystemFunctionpublic java.lang.String getStreamerName()
SystemFunctiongetStreamerName in class SystemFunctionStreamerMap. In non-streaming Saxon editions
(HE and PE) the method always returns null.Copyright (c) 2004-2022 Saxonica Limited. All rights reserved.