public class TraceExpression extends Instruction implements InstructionInfo
EFFECTIVE_BOOLEAN_VALUE, EVALUATE_METHOD, ITEM_FEED_METHOD, ITERATE_METHOD, MAX_SEQUENCE_LENGTH, MAX_STRING_LENGTH, PROCESS_METHOD, staticProperties, UNBOUNDED_LOWER, UNBOUNDED_UPPER, UPDATE_METHOD, WATCH_METHOD| Constructor and Description |
|---|
TraceExpression(Expression child)
Create a trace expression that traces execution of a given child expression
|
| Modifier and Type | Method and Description |
|---|---|
void |
checkForUpdatingSubexpressions()
Check to ensure that this expression does not contain any inappropriate updating subexpressions.
|
Expression |
copy()
Copy an expression.
|
boolean |
createsNewNodes()
Determine whether this instruction creates new nodes.
|
Item |
evaluateItem(XPathContext context)
Evaluate an expression as a single item.
|
void |
evaluatePendingUpdates(XPathContext context,
PendingUpdateList pul)
Evaluate an updating expression, adding the results to a Pending Update List.
|
void |
export(ExpressionPresenter out)
Diagnostic print of expression structure.
|
int |
getCardinality()
Determine the static cardinality of the expression.
|
Expression |
getChild() |
int |
getColumnNumber()
Get the column number.
|
int |
getConstructType()
Get the construct type.
|
int |
getDependencies()
Determine which aspects of the context the expression depends on.
|
ExpressionCompiler |
getExpressionCompiler()
Return the compiler of the Trace expression
|
int |
getImplementationMethod()
An implementation of Expression must provide at least one of the methods evaluateItem(), iterate(), or process().
|
InstructionInfo |
getInstructionInfo()
Get the InstructionInfo details about the construct.
|
int |
getInstructionNameCode()
Get the namecode of the instruction for use in diagnostics
|
ItemType |
getItemType()
Get the item type of the items returned by evaluating this instruction
|
int |
getLineNumber()
Get the line number.
|
NamespaceResolver |
getNamespaceResolver()
Get the namespace resolver to supply the namespace context of the instruction
that is being traced
|
StructuredQName |
getObjectName()
Get a name identifying the object of the expression, for example a function name, template name,
variable name, key name, element name, etc.
|
Iterator<String> |
getProperties()
Get an iterator over all the properties available.
|
Object |
getProperty(String name)
Get a named property of the instruction/expression
|
String |
getPublicId()
Get the Public ID
|
boolean |
isUpdatingExpression()
Determine whether this is an updating expression as defined in the XQuery update specification
|
boolean |
isVacuousExpression()
Determine whether this is a vacuous expression as defined in the XQuery update specification
|
SequenceIterator |
iterate(XPathContext context)
Return an Iterator to iterate over the values of a sequence.
|
Iterable<Operand> |
operands()
Get the immediate sub-expressions of this expression, with information about the relationship
of each expression to its parent expression.
|
TailCall |
processLeavingTail(XPathContext context)
Execute this instruction, with the possibility of returning tail calls if there are any.
|
Expression |
promote(PromotionOffer offer)
Offer promotion for this subexpression.
|
Location |
saveLocation()
Get an immutable copy of this Location object.
|
void |
setChild(Expression child) |
void |
setConstructType(int type)
Set the type of construct.
|
void |
setNamespaceResolver(NamespaceResolver resolver)
Set the namespace context for the instruction being traced.
|
void |
setObjectName(StructuredQName qName)
Set a name identifying the object of the expression, for example a function name, template name,
variable name, key name, element name, etc.
|
void |
setProperty(String name,
Object value)
Set a named property of the instruction/expression
|
assembleParams, assembleTunnelParams, computeCardinality, computeSpecialProperties, dynamicError, evaluateAsString, getExpressionName, getInstructionName, getNetCost, getSourceLocator, isXSLT, main, process, promoteChildren, toStreamingPatternaddToPathMap, adoptChildExpression, checkedOperands, checkPermittedContents, clearStreamabilityData, computeDependencies, computeStaticProperties, doPromotion, dynamicError, effectiveBooleanValue, explain, getConfiguration, getCost, getEvaluationMethod, getHostLanguage, getIntegerBounds, getIntrinsicDependencies, getLocation, getPackageData, getParentExpression, getPosture, getPostureAndSweepIfKnown, getRetainedStaticContext, getSlotsUsed, getSpecialProperties, getStaticBaseURI, getStaticBaseURIString, getStreamability, getStreamingAdjunct, getSweep, getSystemId, hasVariableBinding, identityHashCode, implementsStaticTypeCheck, isCallOn, isCallOnSystemFunction, isIdentical, isSubtreeExpression, iterateEvents, makeStreamingAdjunct, markTailFunctionCalls, operandList, operandSparseList, optimize, optimizeChildren, optimizeForType, resetLocalStaticProperties, restoreParentPointers, setEvaluationMethod, setFiltered, setFlattened, setLocation, setParentExpression, setPostureAndSweep, setRetainedStaticContext, setRetainedStaticContextLocally, setStaticProperty, simplify, simplifyChildren, staticTypeCheck, suppressValidation, toPattern, toShortString, toString, typeCheck, typeCheckChildren, typeError, unorderedclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetSystemIdpublic TraceExpression(Expression child)
child - the expression to be traced. This will be available to the TraceListener
as the value of the "expression" property of the InstructionInfo.public Expression getChild()
public void setChild(Expression child)
public Iterable<Operand> operands()
ExpressionIf the expression is a Callable, then it is required that the order of the operands returned by this function is the same as the order of arguments supplied to the corresponding call() method.
operands in class Instructionpublic void setConstructType(int type)
LocationKindtype - an integer code for the type of construct being tracedpublic int getConstructType()
LocationKindgetConstructType in interface InstructionInfogetConstructType in class InstructionLocationKindpublic void setNamespaceResolver(NamespaceResolver resolver)
resolver - The namespace resolver, or null if none is neededpublic NamespaceResolver getNamespaceResolver()
public void setObjectName(StructuredQName qName)
qName - the name of the object, or null if not applicablepublic StructuredQName getObjectName()
getObjectName in interface InstructionInfogetObjectName in class Expressionpublic void setProperty(String name, Object value)
name - the name of the propertyvalue - the value of the propertypublic Object getProperty(String name)
getProperty in interface InstructionInfogetProperty in class Expressionname - the name of the propertypublic Iterator<String> getProperties()
getProperties in interface InstructionInfogetProperties in class Expressionpublic InstructionInfo getInstructionInfo()
public Expression copy()
Expressioncopy in class Expressionpublic boolean isUpdatingExpression()
isUpdatingExpression in class Expressionpublic boolean isVacuousExpression()
isVacuousExpression in class Expressionpublic void checkForUpdatingSubexpressions()
throws XPathException
checkForUpdatingSubexpressions in class ExpressionXPathException - if the expression has a non-permitted updating subexpressionpublic int getImplementationMethod()
InstructiongetImplementationMethod in class InstructionExpression.ITERATE_METHOD or Expression.EVALUATE_METHOD or
Expression.PROCESS_METHODpublic Expression promote(PromotionOffer offer) throws XPathException
promote in class Expressionoffer - details of the offer, for example the offer to move
expressions that don't depend on the context to an outer level in
the containing expressionXPathException - if any error is detectedpublic TailCall processLeavingTail(XPathContext context) throws XPathException
processLeavingTail in interface TailCallReturnerprocessLeavingTail in class Instructioncontext - the dynamic execution contextXPathExceptionpublic ItemType getItemType()
getItemType in class Instructionpublic int getCardinality()
getCardinality in class Expressionpublic int getDependencies()
StaticProperty.DEPENDS_ON_CONTEXT_ITEM and
StaticProperty.DEPENDS_ON_CURRENT_ITEM. The default implementation combines the intrinsic
dependencies of this expression with the dependencies of the subexpressions,
computed recursively. This is overridden for expressions such as FilterExpression
where a subexpression's dependencies are not necessarily inherited by the parent
expression.getDependencies in class Expressionpublic final boolean createsNewNodes()
createsNewNodes in class Instructionpublic Item evaluateItem(XPathContext context) throws XPathException
evaluateItem in class Instructioncontext - The context in which the expression is to be evaluatedXPathException - if any dynamic error occurs evaluating the
expressionpublic SequenceIterator iterate(XPathContext context) throws XPathException
iterate in class Instructioncontext - supplies the context for evaluationXPathException - if any dynamic error occurs evaluating the
expressionpublic int getInstructionNameCode()
InstructiongetInstructionNameCode in class Instructionpublic void export(ExpressionPresenter out)
export in class Expressionout - the expression presenter used to display the structurepublic void evaluatePendingUpdates(XPathContext context, PendingUpdateList pul) throws XPathException
evaluatePendingUpdates in class Expressioncontext - the XPath dynamic evaluation contextpul - the pending update list to which the results should be writtenXPathException - if evaluation failspublic int getColumnNumber()
LocationgetColumnNumber in interface SourceLocatorgetColumnNumber in interface LocationgetColumnNumber in interface Locatorpublic String getPublicId()
LocationgetPublicId in interface SourceLocatorgetPublicId in interface LocationgetPublicId in interface Locatorpublic int getLineNumber()
LocationgetLineNumber in interface SourceLocatorgetLineNumber in interface LocationgetLineNumber in interface Locatorpublic Location saveLocation()
LocationsaveLocation in interface Locationpublic ExpressionCompiler getExpressionCompiler()
getExpressionCompiler in class ExpressionCopyright (c) 2004-2014 Saxonica Limited. All rights reserved.