gpt4 book ai didi

net.sf.saxon.expr.XPathContextMajor.getOrigin()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-20 18:41:40 25 4
gpt4 key购买 nike

本文整理了Java中net.sf.saxon.expr.XPathContextMajor.getOrigin()方法的一些代码示例,展示了XPathContextMajor.getOrigin()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XPathContextMajor.getOrigin()方法的具体详情如下:
包路径:net.sf.saxon.expr.XPathContextMajor
类名称:XPathContextMajor
方法名:getOrigin

XPathContextMajor.getOrigin介绍

[英]Get information about the creating expression or other construct.
[中]获取有关创建表达式或其他构造的信息。

代码示例

代码示例来源:origin: net.sf.saxon/Saxon-HE

/**
 * Get the variable that is immediately dependent on this one, and register the dependency, so
 * that circularities can be detected across threads. This relies on the fact that when the initialiser
 * for variable X contains a reference to variable Y, then when Y is evaluated, a stack frame will be found
 * on the context stack representing the evaluation of X. We don't set a dependency from X to Y if the value
 * of Y was already available in the Bindery; it's not needed, because in this case we know that evaluation
 * of Y is unproblematic, and can't lead to any circularities.
 *  @param var     the global variable or parameter being evaluated
 * @param context the dynamic evaluation context
 */
protected static void setDependencies(GlobalVariable var, XPathContext context) throws XPathException {
  Controller controller = context.getController();
  if (!(context instanceof XPathContextMajor)) {
    context = getMajorCaller(context);
  }
  while (context != null) {
    do {
      ContextOriginator origin = ((XPathContextMajor) context).getOrigin();
      if (origin instanceof GlobalVariable) {
        controller.registerGlobalVariableDependency((GlobalVariable) origin, var);
        return;
      }
      context = getMajorCaller(context);
    } while (context != null);
  }
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.saxon

/**
 * Get the variable that is immediately dependent on this one, and register the dependency, so
 * that circularities can be detected across threads. This relies on the fact that when the initialiser
 * for variable X contains a reference to variable Y, then when Y is evaluated, a stack frame will be found
 * on the context stack representing the evaluation of X. We don't set a dependency from X to Y if the value
 * of Y was already available in the Bindery; it's not needed, because in this case we know that evaluation
 * of Y is unproblematic, and can't lead to any circularities.
 *  @param var     the global variable or parameter being evaluated
 * @param context the dynamic evaluation context
 */
protected static void setDependencies(GlobalVariable var, XPathContext context) throws XPathException {
  Controller controller = context.getController();
  if (!(context instanceof XPathContextMajor)) {
    context = getMajorCaller(context);
  }
  while (context != null) {
    do {
      ContextOriginator origin = ((XPathContextMajor) context).getOrigin();
      if (origin instanceof GlobalVariable) {
        controller.registerGlobalVariableDependency((GlobalVariable) origin, var);
        return;
      }
      context = getMajorCaller(context);
    } while (context != null);
  }
}

代码示例来源:origin: net.sf.saxon/Saxon-HE

ContextOriginator originator = ((XPathContextMajor) context).getOrigin();
if (originator == null || originator instanceof Controller) {
  return;

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.saxon

return null;
ContextOriginator origin = context.getOrigin();

代码示例来源:origin: net.sf.saxon/Saxon-HE

return null;
ContextOriginator origin = context.getOrigin();

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com