- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中net.sf.saxon.expr.XPathContextMajor.requestTailCall()
方法的一些代码示例,展示了XPathContextMajor.requestTailCall()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XPathContextMajor.requestTailCall()
方法的具体详情如下:
包路径:net.sf.saxon.expr.XPathContextMajor
类名称:XPathContextMajor
方法名:requestTailCall
[英]Reset the local stack frame. This method is used when processing a tail-recursive function. Instead of the function being called recursively, the parameters are set to new values and the function body is evaluated repeatedly
[中]重置本地堆栈帧。此方法用于处理尾部递归函数。不是递归调用函数,而是将参数设置为新值,并重复计算函数体
代码示例来源:origin: net.sourceforge.saxon/saxon
public TailCall processLeavingTail(XPathContext context) throws XPathException {
if (context instanceof XPathContextMajor) {
((XPathContextMajor)context).requestTailCall(breakFunction, emptyArgs);
}
return null;
}
代码示例来源:origin: net.sf.saxon/Saxon-HE
public void markContext(XPathContext context) {
XPathContext c = context;
while (!(c instanceof XPathContextMajor)) {
c = c.getCaller();
}
((XPathContextMajor) c).requestTailCall(this, null);
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.saxon
public void markContext(XPathContext context) {
XPathContext c = context;
while (!(c instanceof XPathContextMajor)) {
c = c.getCaller();
}
((XPathContextMajor) c).requestTailCall(this, null);
}
代码示例来源:origin: net.sf.saxon/Saxon-HE
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);
}
}
代码示例来源:origin: net.sourceforge.saxon/saxon
public TailCall processLeavingTail(XPathContext context) throws XPathException {
XPathContextMajor cm = (XPathContextMajor)context;
ParameterSet params = assembleParams(context, actualParams);
cm.setLocalParameters(params);
cm.requestTailCall(continueFunction, emptyArgs);
return null;
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.saxon
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);
}
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.saxon
public TailCall processLeavingTail(XPathContext context) throws XPathException {
XPathContext c = context;
while (!(c instanceof XPathContextMajor)) {
c = c.getCaller();
}
XPathContextMajor cm = (XPathContextMajor)c;
if (actualParams.length == 1) {
cm.setLocalVariable(actualParams[0].getSlotNumber(), actualParams[0].getSelectValue(context));
} else {
// we can't overwrite any of the parameters until we've evaluated all of them: test iterate012
Sequence[] oldVars = cm.getAllVariableValues();
Sequence[] newVars = Arrays.copyOf(oldVars, oldVars.length);
for (WithParam wp : actualParams) {
newVars[wp.getSlotNumber()] = wp.getSelectValue(context);
}
cm.resetAllVariableValues(newVars);
}
cm.requestTailCall(this, null);
return null;
}
代码示例来源:origin: net.sf.saxon/Saxon-HE
public TailCall processLeavingTail(XPathContext context) throws XPathException {
XPathContext c = context;
while (!(c instanceof XPathContextMajor)) {
c = c.getCaller();
}
XPathContextMajor cm = (XPathContextMajor)c;
if (actualParams.length == 1) {
cm.setLocalVariable(actualParams[0].getSlotNumber(), actualParams[0].getSelectValue(context));
} else {
// we can't overwrite any of the parameters until we've evaluated all of them: test iterate012
Sequence[] oldVars = cm.getAllVariableValues();
Sequence[] newVars = Arrays.copyOf(oldVars, oldVars.length);
for (WithParam wp : actualParams) {
newVars[wp.getSlotNumber()] = wp.getSelectValue(context);
}
cm.resetAllVariableValues(newVars);
}
cm.requestTailCall(this, null);
return null;
}
代码示例来源:origin: net.sf.saxon/Saxon-B
/**
* Process the function call in push mode
* @param context the XPath dynamic context
* @throws XPathException
*/
public void process(XPathContext context) throws XPathException {
ValueRepresentation[] actualArgs = evaluateArguments(context);
if (tailCall) {
((XPathContextMajor)context).requestTailCall(function, actualArgs);
} else {
SequenceReceiver out = context.getReceiver();
XPathContextMajor c2 = context.newCleanContext();
c2.setReceiver(out);
c2.setOrigin(this);
function.process(actualArgs, c2);
}
}
代码示例来源:origin: net.sourceforge.saxon/saxon
/**
* Process the function call in push mode
* @param context the XPath dynamic context
* @throws XPathException
*/
public void process(XPathContext context) throws XPathException {
ValueRepresentation[] actualArgs = evaluateArguments(context);
if (tailCall) {
((XPathContextMajor)context).requestTailCall(function, actualArgs);
} else {
SequenceReceiver out = context.getReceiver();
XPathContextMajor c2 = context.newCleanContext();
c2.setReceiver(out);
c2.setOrigin(this);
function.process(actualArgs, c2);
}
}
代码示例来源:origin: org.opengis.cite.saxon/saxon9
/**
* Process the function call in push mode
* @param context the XPath dynamic context
* @throws XPathException
*/
public void process(XPathContext context) throws XPathException {
ValueRepresentation[] actualArgs = evaluateArguments(context);
if (tailCall) {
((XPathContextMajor)context).requestTailCall(function, actualArgs);
} else {
SequenceReceiver out = context.getReceiver();
XPathContextMajor c2 = context.newCleanContext();
c2.setReceiver(out);
c2.setOrigin(this);
function.process(actualArgs, c2);
}
}
代码示例来源:origin: net.sourceforge.saxon/saxon
/**
* Process the function call in pull mode
* @param context the XPath dynamic context
* @throws XPathException
*/
public EventIterator iterateEvents(XPathContext context) throws XPathException {
ValueRepresentation[] actualArgs = evaluateArguments(context);
if (tailCall) {
((XPathContextMajor)context).requestTailCall(function, actualArgs);
return EmptyEventIterator.getInstance();
} else {
SequenceReceiver out = context.getReceiver();
XPathContextMajor c2 = context.newCleanContext();
c2.setReceiver(out);
c2.setOrigin(this);
return function.iterateEvents(actualArgs, c2);
}
}
代码示例来源:origin: net.sf.saxon/Saxon-B
/**
* Process the function call in pull mode
* @param context the XPath dynamic context
* @throws XPathException
*/
public EventIterator iterateEvents(XPathContext context) throws XPathException {
ValueRepresentation[] actualArgs = evaluateArguments(context);
if (tailCall) {
((XPathContextMajor)context).requestTailCall(function, actualArgs);
return EmptyEventIterator.getInstance();
} else {
SequenceReceiver out = context.getReceiver();
XPathContextMajor c2 = context.newCleanContext();
c2.setReceiver(out);
c2.setOrigin(this);
return function.iterateEvents(actualArgs, c2);
}
}
代码示例来源:origin: org.opengis.cite.saxon/saxon9
/**
* Process the function call in pull mode
* @param context the XPath dynamic context
* @throws XPathException
*/
public EventIterator iterateEvents(XPathContext context) throws XPathException {
ValueRepresentation[] actualArgs = evaluateArguments(context);
if (tailCall) {
((XPathContextMajor)context).requestTailCall(function, actualArgs);
return EmptyEventIterator.getInstance();
} else {
SequenceReceiver out = context.getReceiver();
XPathContextMajor c2 = context.newCleanContext();
c2.setReceiver(out);
c2.setOrigin(this);
return function.iterateEvents(actualArgs, c2);
}
}
代码示例来源:origin: net.sourceforge.saxon/saxon
/**
* This is the method that actually does the function call
* @param c the dynamic context
* @return the result of the function
* @throws XPathException if dynamic errors occur
*/
private ValueRepresentation callFunction(XPathContext c) throws XPathException {
ValueRepresentation[] actualArgs = evaluateArguments(c);
if (tailCall) {
((XPathContextMajor)c).requestTailCall(function, actualArgs);
return EmptySequence.getInstance();
}
XPathContextMajor c2 = c.newCleanContext();
c2.setOrigin(this);
c2.setTemporaryOutputState(true);
try {
return function.call(actualArgs, c2);
} catch (StackOverflowError err) {
throw new XPathException("Too many nested function calls. May be due to infinite recursion.", this);
} catch (NullPointerException err) {
if (function == null) {
throw new NullPointerException("Unbound function call " +
function.getFunctionName().getDisplayName());
} else {
throw err;
}
}
}
代码示例来源:origin: net.sf.saxon/Saxon-B
/**
* This is the method that actually does the function call
* @param c the dynamic context
* @return the result of the function
* @throws XPathException if dynamic errors occur
*/
private ValueRepresentation callFunction(XPathContext c) throws XPathException {
ValueRepresentation[] actualArgs = evaluateArguments(c);
if (tailCall) {
((XPathContextMajor)c).requestTailCall(function, actualArgs);
return EmptySequence.getInstance();
}
XPathContextMajor c2 = c.newCleanContext();
c2.setOrigin(this);
c2.setTemporaryOutputState(true);
try {
return function.call(actualArgs, c2);
} catch (StackOverflowError err) {
throw new XPathException("Too many nested function calls. May be due to infinite recursion.", this);
} catch (NullPointerException err) {
if (function == null) {
throw new NullPointerException("Unbound function call " +
function.getFunctionName().getDisplayName());
} else {
throw err;
}
}
}
代码示例来源:origin: org.opengis.cite.saxon/saxon9
/**
* This is the method that actually does the function call
* @param c the dynamic context
* @return the result of the function
* @throws XPathException if dynamic errors occur
*/
private ValueRepresentation callFunction(XPathContext c) throws XPathException {
ValueRepresentation[] actualArgs = evaluateArguments(c);
if (tailCall) {
((XPathContextMajor)c).requestTailCall(function, actualArgs);
return EmptySequence.getInstance();
}
XPathContextMajor c2 = c.newCleanContext();
c2.setOrigin(this);
c2.setTemporaryOutputState(true);
try {
return function.call(actualArgs, c2);
} catch (StackOverflowError err) {
throw new XPathException("Too many nested function calls. May be due to infinite recursion.", this);
} catch (NullPointerException err) {
if (function == null) {
throw new NullPointerException("Unbound function call " +
function.getFunctionName().getDisplayName());
} else {
throw err;
}
}
}
本文整理了Java中net.sf.saxon.expr.XPathContextMajor.getCurrentMode()方法的一些代码示例,展示了XPathContextMajor.getCurr
本文整理了Java中net.sf.saxon.expr.XPathContextMajor.setURIResolver()方法的一些代码示例,展示了XPathContextMajor.setURIR
本文整理了Java中net.sf.saxon.expr.XPathContextMajor.setCurrentOutputUri()方法的一些代码示例,展示了XPathContextMajor.se
本文整理了Java中net.sf.saxon.expr.XPathContextMajor.setOriginatingConstructType()方法的一些代码示例,展示了XPathContext
本文整理了Java中net.sf.saxon.expr.XPathContextMajor.trackFocus()方法的一些代码示例,展示了XPathContextMajor.trackFocus(
本文整理了Java中net.sf.saxon.expr.XPathContextMajor.waitForChildThreads()方法的一些代码示例,展示了XPathContextMajor.wa
本文整理了Java中net.sf.saxon.expr.XPathContextMajor.setCurrentException()方法的一些代码示例,展示了XPathContextMajor.se
本文整理了Java中net.sf.saxon.expr.XPathContextMajor.setCurrentMergeGroupIterator()方法的一些代码示例,展示了XPathContex
本文整理了Java中net.sf.saxon.expr.XPathContextMajor.setCurrentComponent()方法的一些代码示例,展示了XPathContextMajor.se
本文整理了Java中net.sf.saxon.expr.XPathContextMajor.getOrigin()方法的一些代码示例,展示了XPathContextMajor.getOrigin()的
本文整理了Java中net.sf.saxon.expr.XPathContextMajor.changeOutputDestination()方法的一些代码示例,展示了XPathContextMajo
本文整理了Java中net.sf.saxon.expr.XPathContextMajor.resetAllVariableValues()方法的一些代码示例,展示了XPathContextMajor
本文整理了Java中net.sf.saxon.expr.XPathContextMajor.getURIResolver()方法的一些代码示例,展示了XPathContextMajor.getURIR
本文整理了Java中net.sf.saxon.expr.XPathContextMajor.setErrorListener()方法的一些代码示例,展示了XPathContextMajor.setEr
本文整理了Java中net.sf.saxon.expr.XPathContextMajor.setLocalVariable()方法的一些代码示例,展示了XPathContextMajor.setLo
本文整理了Java中net.sf.saxon.expr.XPathContextMajor.getStackFrame()方法的一些代码示例,展示了XPathContextMajor.getStack
本文整理了Java中net.sf.saxon.expr.XPathContextMajor.openStackFrame()方法的一些代码示例,展示了XPathContextMajor.openSta
本文整理了Java中net.sf.saxon.expr.XPathContextMajor.setStackFrame()方法的一些代码示例,展示了XPathContextMajor.setStack
本文整理了Java中net.sf.saxon.expr.XPathContextMajor.()方法的一些代码示例,展示了XPathContextMajor.()的具体用法。这些代码示例主要来源于Gi
本文整理了Java中net.sf.saxon.expr.XPathContextMajor.setCurrentMode()方法的一些代码示例,展示了XPathContextMajor.setCurr
我是一名优秀的程序员,十分优秀!