/** * Type-check the expression. This also calls preEvaluate() to evaluate the function * if all the arguments are constant; functions that do not require this behavior * can override the preEvaluate method. */ /*@NotNull*/ public Expression typeCheck(ExpressionVisitor visitor, ContextItemStaticInfo contextInfo) throws XPathException { typeCheckChildren(visitor, contextInfo); checkArguments(visitor); return preEvaluateIfConstant(visitor); }
/** * Type-check the expression. This also calls preEvaluate() to evaluate the function * if all the arguments are constant; functions that do not require this behavior * can override the preEvaluate method. */ /*@NotNull*/ public Expression typeCheck(ExpressionVisitor visitor, ContextItemStaticInfo contextInfo) throws XPathException { typeCheckChildren(visitor, contextInfo); checkArguments(visitor); return preEvaluateIfConstant(visitor); }
/** * Type-check the expression. This also calls preEvaluate() to evaluate the function * if all the arguments are constant; functions that do not require this behavior * can override the preEvaluate method. */ public Expression typeCheck(ExpressionVisitor visitor, ItemType contextItemType) throws XPathException { boolean fixed = true; for (int i=0; i<argument.length; i++) { Expression exp = visitor.typeCheck(argument[i], contextItemType); if (exp != argument[i]) { adoptChildExpression(exp); argument[i] = exp; } if (!(argument[i] instanceof Literal)) { fixed = false; } } checkArguments(visitor); if (fixed) { try { return preEvaluate(visitor); } catch (NoDynamicContextException err) { // Early evaluation failed, typically because the implicit timezone is not yet known. // Try again later at run-time. return this; } } else { return this; } }
/** * Type-check the expression. This also calls preEvaluate() to evaluate the function * if all the arguments are constant; functions that do not require this behavior * can override the preEvaluate method. */ public Expression typeCheck(ExpressionVisitor visitor, ItemType contextItemType) throws XPathException { boolean fixed = true; for (int i=0; i<argument.length; i++) { Expression exp = visitor.typeCheck(argument[i], contextItemType); if (exp != argument[i]) { adoptChildExpression(exp); argument[i] = exp; } if (!(argument[i] instanceof Literal)) { fixed = false; } } checkArguments(visitor); if (fixed) { try { return preEvaluate(visitor); } catch (NoDynamicContextException err) { // Early evaluation failed, typically because the implicit timezone is not yet known. // Try again later at run-time. return this; } } else { return this; } }
checkArguments(visitor); if (fixed) { return preEvaluate(visitor);
checkArguments(visitor); if (fixed) { return preEvaluate(visitor);
/** * Type-check the expression. This also calls preEvaluate() to evaluate the function * if all the arguments are constant; functions that do not require this behavior * can override the preEvaluate method. */ public Expression typeCheck(ExpressionVisitor visitor, ItemType contextItemType) throws XPathException { boolean fixed = true; for (int i=0; i<argument.length; i++) { Expression exp = visitor.typeCheck(argument[i], contextItemType); if (exp != argument[i]) { adoptChildExpression(exp); argument[i] = exp; } if (!(argument[i] instanceof Literal)) { fixed = false; } } checkArguments(visitor); if (fixed) { try { return preEvaluate(visitor); } catch (NoDynamicContextException err) { // Early evaluation failed, typically because the implicit timezone is not yet known. // Try again later at run-time. return this; } } else { return this; } }
checkArguments(visitor); if (fixed) { return preEvaluate(visitor);