Package net.sf.saxon.functions
Class Trace
java.lang.Object
net.sf.saxon.functions.AbstractFunction
net.sf.saxon.functions.SystemFunction
net.sf.saxon.functions.Trace
- All Implemented Interfaces:
Iterable<Function>,Callable,Function,GroundedValue<Function>,Item<Function>,Sequence<Function>
This class supports the XPath 2.0 function trace().
The value is traced to the registered output stream (defaulting to System.err),
unless a TraceListener is in use, in which case the information is sent to the TraceListener
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionSequence<?>call(XPathContext context, Sequence[] arguments) Evaluate the expressionintgetCardinality(Expression[] arguments) Get the cardinality, given knowledge of the actual argumentsintgetSpecialProperties(Expression[] arguments) Get the static properties of this expression (other than its type).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.makeFunctionCall(Expression... arguments) Make an expression that either calls this function, or that is equivalent to a call on this functionvoidnotifyListener(String label, Sequence<?> val, SourceLocator loc, XPathContext context) static voidMethods inherited from class net.sf.saxon.functions.SystemFunction
dependsOnContextItem, dynamicCall, equals, export, exportAdditionalArguments, exportAttributes, fixArguments, getArity, getCompilerName, getContextNode, getDescription, getDetails, getErrorCodeForTypeErrors, getFunctionItemType, getFunctionName, getIntegerBounds, getNetCost, getOperandRoles, getRequiredType, getResultItemType, getResultItemType, getRetainedStaticContext, getStaticBaseUriString, importAttributes, isTrustedResultType, makeCall, makeFunction, makeOptimizedFunctionCall, resultIfEmpty, setArity, setDetails, setRetainedStaticContext, supplyTypeInformation, toShortString, toString, typeCheckCallerMethods inherited from class net.sf.saxon.functions.AbstractFunction
atomize, deepEquals, effectiveBooleanValue, getAnnotations, getStringValue, getStringValueCS, isArray, isMap, makeNewContext, simplify, typeCheckMethods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface net.sf.saxon.om.GroundedValue
asIterable, materializeMethods inherited from interface net.sf.saxon.om.Item
getLength, head, isStreamed, itemAt, iterate, iterator, reduce, subsequenceMethods inherited from interface java.lang.Iterable
forEach, spliteratorMethods inherited from interface net.sf.saxon.om.Sequence
makeRepeatable
-
Field Details
-
location
Location location
-
-
Constructor Details
-
Trace
public Trace()
-
-
Method Details
-
getSpecialProperties
Get the static properties of this expression (other than its type). The result is bit-significant. These properties are used for optimizations. In general, if property bit is set, it is true, but if it is unset, the value is unknown.- Overrides:
getSpecialPropertiesin classSystemFunction- Parameters:
arguments- the actual arguments
-
getCardinality
Description copied from class:SystemFunctionGet the cardinality, given knowledge of the actual arguments- Overrides:
getCardinalityin classSystemFunction- Parameters:
arguments- the actual arguments supplied- Returns:
- the most precise available cardinality that the function will return
-
notifyListener
-
makeFunctionCall
Description copied from class:SystemFunctionMake an expression that either calls this function, or that is equivalent to a call on this function- Overrides:
makeFunctionCallin classSystemFunction- Parameters:
arguments- the supplied arguments to the function call- Returns:
- either a function call on this function, or an expression that delivers the same result
-
traceItem
-
call
Evaluate the expression- Parameters:
context- the dynamic evaluation contextarguments- the values of the arguments, supplied as SequenceIterators- Returns:
- the result of the evaluation, in the form of a SequenceIterator
- Throws:
XPathException- if a dynamic error occurs during the evaluation of the expression
-
getStreamerName
Description copied from class:SystemFunctionGet 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. Special streaming support is generally available in Saxon-EE for all system functions that take a sequence as their argument.- Overrides:
getStreamerNamein classSystemFunction- Returns:
- a name that identifies a class that supports streamed evaluation of this system
function, or null if no such class is available. The mapping of names to classes is
defined in the Saxon-EE class
StreamerMap. In non-streaming Saxon editions (HE and PE) the method always returns null.
-