public UserFunction getTargetFunction(XPathContext context) { return (UserFunction) getTargetComponent(context).getActor(); }
public UserFunction getTargetFunction(XPathContext context) { return (UserFunction) getTargetComponent(context).getActor(); }
private void requestTailCall(XPathContext context, Sequence<?>[] actualArgs) { if (bindingSlot >= 0) { TailCallLoop.TailCallComponent info = new TailCallLoop.TailCallComponent(); Component target = getTargetComponent(context); info.component = target; info.function = (UserFunction) target.getActor(); ((XPathContextMajor) context).requestTailCall(info, actualArgs); } else { TailCallLoop.TailCallFunction info = new TailCallLoop.TailCallFunction(); info.function = function; ((XPathContextMajor) context).requestTailCall(info, actualArgs); } }
private void requestTailCall(XPathContext context, Sequence<?>[] actualArgs) { if (bindingSlot >= 0) { TailCallLoop.TailCallComponent info = new TailCallLoop.TailCallComponent(); Component target = getTargetComponent(context); info.component = target; info.function = (UserFunction) target.getActor(); ((XPathContextMajor) context).requestTailCall(info, actualArgs); } else { TailCallLoop.TailCallFunction info = new TailCallLoop.TailCallFunction(); info.function = function; ((XPathContextMajor) context).requestTailCall(info, actualArgs); } }
/** * Process the function call in push mode * * @param context the XPath dynamic context * @throws XPathException if a dynamic error occurs */ public void process(XPathContext context) throws XPathException { Sequence<?>[] actualArgs = evaluateArguments(context); if (isTailCall()) { requestTailCall(context, actualArgs); return; } if (bindingSlot >= 0) { Component target = getTargetComponent(context); UserFunction targetFunction = (UserFunction) target.getActor(); if (target.getVisibility() == Visibility.ABSTRACT) { throw new XPathException("Cannot call a function defined with visibility=abstract", "XTDE3052"); } XPathContextMajor c2 = targetFunction.makeNewContext(context, this); c2.setCurrentComponent(target); c2.setOrigin(this); targetFunction.process(actualArgs, c2); } else { XPathContextMajor c2 = function.makeNewContext(context, this); c2.setOrigin(this); function.process(actualArgs, c2); } }
/** * Process the function call in push mode * * @param context the XPath dynamic context * @throws XPathException if a dynamic error occurs */ public void process(XPathContext context) throws XPathException { Sequence<?>[] actualArgs = evaluateArguments(context); if (isTailCall()) { requestTailCall(context, actualArgs); return; } if (bindingSlot >= 0) { Component target = getTargetComponent(context); UserFunction targetFunction = (UserFunction) target.getActor(); if (target.getVisibility() == Visibility.ABSTRACT) { throw new XPathException("Cannot call a function defined with visibility=abstract", "XTDE3052"); } XPathContextMajor c2 = targetFunction.makeNewContext(context); c2.setCurrentComponent(target); c2.setOrigin(this); targetFunction.process(actualArgs, c2); } else { XPathContextMajor c2 = function.makeNewContext(context); c2.setOrigin(this); function.process(actualArgs, c2); } }
Component target = getTargetComponent(context); if (target.isHiddenAbstractComponent()) { throw new XPathException("Cannot call an abstract function (" +
Component target = getTargetComponent(context); if (target.isHiddenAbstractComponent()) { throw new XPathException("Cannot call an abstract function (" +