net.sf.saxon.expr
Class PromoteToDouble

java.lang.Object
  extended by net.sf.saxon.expr.Expression
      extended by net.sf.saxon.expr.UnaryExpression
          extended by net.sf.saxon.expr.NumericPromoter
              extended by net.sf.saxon.expr.PromoteToDouble
All Implemented Interfaces:
Serializable, SourceLocator, LocationProvider, SaxonLocator, EvaluableItem, SequenceIterable, InstructionInfo, Locator

public class PromoteToDouble
extends NumericPromoter

Expression that performs numeric promotion to xs:double

See Also:
Serialized Form

Field Summary
 
Fields inherited from class net.sf.saxon.expr.UnaryExpression
operand
 
Fields inherited from class net.sf.saxon.expr.Expression
EVALUATE_METHOD, ITERATE_METHOD, locationId, PROCESS_METHOD, staticProperties
 
Constructor Summary
PromoteToDouble(Expression exp)
           
 
Method Summary
 Expression copy()
          Copy an expression.
 ItemType getItemType(TypeHierarchy th)
          Determine the data type of the items returned by the expression, if possible
protected  AtomicValue promote(AtomicValue value, XPathContext context)
          Perform the promotion
 
Methods inherited from class net.sf.saxon.expr.NumericPromoter
evaluateItem, explain, iterate, optimize, simplify, typeCheck
 
Methods inherited from class net.sf.saxon.expr.UnaryExpression
computeCardinality, computeSpecialProperties, displayExpressionName, displayOperator, equals, getBaseExpression, hashCode, iterateSubExpressions, promote, replaceSubExpression, toString
 
Methods inherited from class net.sf.saxon.expr.Expression
addToPathMap, adoptChildExpression, checkForUpdatingSubexpressions, checkPermittedContents, computeDependencies, computeStaticProperties, doPromotion, dynamicError, effectiveBooleanValue, evaluateAsString, evaluatePendingUpdates, explain, getCardinality, getColumnNumber, getColumnNumber, getConstructType, getContainer, getDependencies, getExecutable, getHostLanguage, getImplementationMethod, getIntrinsicDependencies, getLineNumber, getLineNumber, getLocationId, getLocationProvider, getObjectName, getProperties, getProperty, getPublicId, getSlotsUsed, getSpecialProperties, getSystemId, getSystemId, hasLoopingSubexpression, implementsStaticTypeCheck, isSubtreeExpression, isUpdatingExpression, isVacuousExpression, iterateEvents, iterateSameFocusSubExpressions, markTailFunctionCalls, process, resetLocalStaticProperties, setContainer, setFiltered, setFlattened, setLocationId, staticTypeCheck, suppressValidation, typeError
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PromoteToDouble

public PromoteToDouble(Expression exp)
Method Detail

getItemType

public ItemType getItemType(TypeHierarchy th)
Determine the data type of the items returned by the expression, if possible

Overrides:
getItemType in class UnaryExpression
Parameters:
th - the type hierarchy cache
Returns:
a value such as Type.STRING, Type.BOOLEAN, Type.NUMBER, Type.NODE, or Type.ITEM (meaning not known in advance)

copy

public Expression copy()
Copy an expression. This makes a deep copy.

Specified by:
copy in class Expression
Returns:
the copy of the original expression

promote

protected AtomicValue promote(AtomicValue value,
                              XPathContext context)
                       throws XPathException
Perform the promotion

Specified by:
promote in class NumericPromoter
Parameters:
value - the numeric or untyped atomic value to be promoted
context - the XPath dynamic evaluation context
Returns:
the value that results from the promotion
Throws:
XPathException


Copyright (c) Saxonica Limited. All rights reserved.