This checks statically that the operands of the expression have the correct type; if necessary it generates code to do run-time type checking or type conversion. A static type error is reported only if execution cannot possibly succeed, that is, if a run-time type error is inevitable. The call may return a modified form of the expression.
This method is called after all references to functions and variables have been resolved to the declaration of the function or variable. However, the types of such functions and variables may not be accurately known if they have not been explicitly declared.
@param env the static context of the expression @param 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 to {@link net.sf.saxon.type.Type#ITEM_TYPE} @exception net.sf.saxon.xpath.StaticError if an error is discovered during this phase(typically a type error) @return the original expression, rewritten to perform necessaryrun-time type checks, and to perform other type-related optimizations
|
|