/** * Type-check references to this function * * @param visitor the expression visitor */ public void checkReferences(ExpressionVisitor visitor) throws XPathException { for (UserFunctionResolvable ufr : references) { if (ufr instanceof UserFunctionCall) { UserFunctionCall ufc = (UserFunctionCall) ufr; ufc.checkFunctionCall(compiledFunction, visitor); //ufc.computeArgumentEvaluationModes(); } } // clear the list of references, so that more can be added in another module references = new ArrayList<>(0); }
/** * Type-check references to this function * * @param visitor the expression visitor */ public void checkReferences(ExpressionVisitor visitor) throws XPathException { for (UserFunctionResolvable ufr : references) { if (ufr instanceof UserFunctionCall) { UserFunctionCall ufc = (UserFunctionCall) ufr; ufc.checkFunctionCall(compiledFunction, visitor); //ufc.computeArgumentEvaluationModes(); } } // clear the list of references, so that more can be added in another module references = new ArrayList<>(0); }
/** * Type-check references to this function * @param visitor the expression visitor */ public void checkReferences(ExpressionVisitor visitor) throws XPathException { Iterator iter = references.iterator(); while (iter.hasNext()) { UserFunctionCall ufc = (UserFunctionCall)iter.next(); ufc.checkFunctionCall(compiledFunction, visitor); ufc.computeArgumentEvaluationModes(); } // clear the list of references, so that more can be added in another module references = new ArrayList(0); }
/** * Type-check references to this function * @param visitor the expression visitor */ public void checkReferences(ExpressionVisitor visitor) throws XPathException { Iterator iter = references.iterator(); while (iter.hasNext()) { UserFunctionCall ufc = (UserFunctionCall)iter.next(); ufc.checkFunctionCall(compiledFunction, visitor); ufc.computeArgumentEvaluationModes(); } // clear the list of references, so that more can be added in another module references = new ArrayList(0); }
public Expression typeCheck(ExpressionVisitor visitor, ContextItemStaticInfo contextInfo) throws XPathException { Expression e = super.typeCheck(visitor, contextInfo); if (e != this) { return e; } if (function != null) { checkFunctionCall(function, visitor); if (staticType == null || staticType == SequenceType.ANY_SEQUENCE) { // try to get a better type staticType = function.getResultType(); } } return this; }
public Expression typeCheck(ExpressionVisitor visitor, ContextItemStaticInfo contextInfo) throws XPathException { Expression e = super.typeCheck(visitor, contextInfo); if (e != this) { return e; } if (function != null) { checkFunctionCall(function, visitor); if (staticType == null || staticType == SequenceType.ANY_SEQUENCE) { // try to get a better type staticType = function.getResultType(); } } return this; }
/** * Fixup all function references. * @param compiledFunction the Instruction representing this function in the compiled code * @throws XPathException if an error occurs. */ private void fixupInstruction(UserFunction compiledFunction) throws XPathException { ExpressionVisitor visitor = makeExpressionVisitor(); try { Iterator iter = references.iterator(); while (iter.hasNext()) { UserFunctionCall call = ((UserFunctionCall)iter.next()); call.setFunction(compiledFunction); call.checkFunctionCall(compiledFunction, visitor); call.computeArgumentEvaluationModes(); } } catch (XPathException err) { compileError(err); } }
/** * Fixup all function references. * @param compiledFunction the Instruction representing this function in the compiled code * @throws XPathException if an error occurs. */ private void fixupInstruction(UserFunction compiledFunction) throws XPathException { ExpressionVisitor visitor = makeExpressionVisitor(); try { Iterator iter = references.iterator(); while (iter.hasNext()) { UserFunctionCall call = ((UserFunctionCall)iter.next()); call.setFunction(compiledFunction); call.checkFunctionCall(compiledFunction, visitor); call.computeArgumentEvaluationModes(); } } catch (XPathException err) { compileError(err); } }
fc.setArguments(staticArgs); fc.setFunction(fn); fc.checkFunctionCall(fn, visitor); fc.setStaticType(fn.getResultType(config.getTypeHierarchy())); return fc;
fc.setArguments(staticArgs); fc.setFunction(fn); fc.checkFunctionCall(fn, visitor); fc.setStaticType(fn.getResultType(config.getTypeHierarchy())); return fc;
ExpressionVisitor visitor = ExpressionVisitor.make(fd.getStaticContext()); visitor.setExecutable(fd.getExecutable()); ufc.checkFunctionCall(fn, visitor);
ExpressionVisitor visitor = ExpressionVisitor.make(fd.getStaticContext()); visitor.setExecutable(fd.getExecutable()); ufc.checkFunctionCall(fn, visitor);