| java.lang.Object net.sf.saxon.expr.ComputedExpression net.sf.saxon.expr.UnaryExpression net.sf.saxon.expr.CardinalityChecker
CardinalityChecker | final public class CardinalityChecker extends UnaryExpression (Code) | | A CardinalityChecker implements the cardinality checking of "treat as": that is,
it returns the supplied sequence, checking that its cardinality is correct
|
computeCardinality | public int computeCardinality()(Code) | | Determine the static cardinality of the expression
|
computeSpecialProperties | public int computeSpecialProperties()(Code) | | Get the static properties of this expression (other than its type). The result is
bit-signficant. 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.
|
displayOperator | public String displayOperator(NamePool pool)(Code) | | Diagnostic print of expression structure
|
equals | public boolean equals(Object other)(Code) | | Is this expression the same as another expression?
|
getImplementationMethod | public int getImplementationMethod()(Code) | | An implementation of Expression must provide at least one of the methods evaluateItem(), iterate(), or process().
This method indicates which of these methods is provided. This implementation provides both iterate() and
process() methods natively.
|
getItemType | public ItemType getItemType(TypeHierarchy th)(Code) | | Determine the data type of the items returned by the expression, if possible
a value such as Type.STRING, Type.BOOLEAN, Type.NUMBER, Type.NODE,or Type.ITEM (meaning not known in advance) Parameters: th - |
getRequiredCardinality | public int getRequiredCardinality()(Code) | | Get the required cardinality
|
makeCardinalityChecker | public static ComputedExpression makeCardinalityChecker(Expression sequence, int cardinality, RoleLocator role)(Code) | | Factory method to construct a CardinalityChecker. The method may create an expression that combines
the cardinality checking with the functionality of the underlying expression class
Parameters: sequence - Parameters: cardinality - Parameters: role - |
optimize | public Expression optimize(Optimizer opt, StaticContext env, ItemType contextItemType) throws XPathException(Code) | | Perform optimisation of an expression and its subexpressions.
This method is called after all references to functions and variables have been resolved
to the declaration of the function or variable, and after all type checking has been done.
Parameters: opt - the optimizer in use. This provides access to supporting functions; it also allowsdifferent optimization strategies to be used in different circumstances. Parameters: env - the static context of the expression Parameters: contextItemType - the static type of "." at the point where this expression is invoked.The parameter is set to null if it is known statically that the context item will be undefined.If the type of the context item is not known statically, the argument is set tonet.sf.saxon.type.Type.ITEM_TYPE the original expression, rewritten if appropriate to optimize execution throws: net.sf.saxon.trans.StaticError - if an error is discovered during this phase(typically a type error) |
process | public void process(XPathContext context) throws XPathException(Code) | | Process the instruction, without returning any tail calls
Parameters: context - The dynamic context, giving access to the current node,the current variables, etc. |
setErrorCode | public void setErrorCode(String code)(Code) | | Set the error code to be returned (this is used when evaluating the functions such
as exactly-one() which have their own error codes)
|
|
|