• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java OpMap类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中com.sun.org.apache.xpath.internal.compiler.OpMap的典型用法代码示例。如果您正苦于以下问题:Java OpMap类的具体用法?Java OpMap怎么用?Java OpMap使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



OpMap类属于com.sun.org.apache.xpath.internal.compiler包,在下文中一共展示了OpMap类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: BasicTestIterator

import com.sun.org.apache.xpath.internal.compiler.OpMap; //导入依赖的package包/类
/**
 * Create a LocPathIterator object, including creation
 * of step walkers from the opcode list, and call back
 * into the Compiler to create predicate expressions.
 *
 * @param compiler The Compiler which is creating
 * this expression.
 * @param opPos The position of this iterator in the
 * opcode list from the compiler.
 *
 * @throws javax.xml.transform.TransformerException
 */
protected BasicTestIterator(Compiler compiler, int opPos, int analysis)
        throws javax.xml.transform.TransformerException
{
  super(compiler, opPos, analysis, false);

  int firstStepPos = OpMap.getFirstChildPos(opPos);
  int whatToShow = compiler.getWhatToShow(firstStepPos);

  if ((0 == (whatToShow
             & (DTMFilter.SHOW_ATTRIBUTE
             | DTMFilter.SHOW_NAMESPACE
             | DTMFilter.SHOW_ELEMENT
             | DTMFilter.SHOW_PROCESSING_INSTRUCTION)))
             || (whatToShow == DTMFilter.SHOW_ALL))
    initNodeTest(whatToShow);
  else
  {
    initNodeTest(whatToShow, compiler.getStepNS(firstStepPos),
                            compiler.getStepLocalName(firstStepPos));
  }
  initPredicateInfo(compiler, firstStepPos);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:35,代码来源:BasicTestIterator.java


示例2: OneStepIterator

import com.sun.org.apache.xpath.internal.compiler.OpMap; //导入依赖的package包/类
/**
 * Create a OneStepIterator object.
 *
 * @param compiler A reference to the Compiler that contains the op map.
 * @param opPos The position within the op map, which contains the
 * location path expression for this itterator.
 *
 * @throws javax.xml.transform.TransformerException
 */
OneStepIterator(Compiler compiler, int opPos, int analysis)
        throws javax.xml.transform.TransformerException
{
  super(compiler, opPos, analysis);
  int firstStepPos = OpMap.getFirstChildPos(opPos);

  m_axis = WalkerFactory.getAxisFromStep(compiler, firstStepPos);

}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:19,代码来源:OneStepIterator.java


示例3: functionProximateOrContainsProximate

import com.sun.org.apache.xpath.internal.compiler.OpMap; //导入依赖的package包/类
static boolean functionProximateOrContainsProximate(Compiler compiler,
                                                    int opPos)
{
  int endFunc = opPos + compiler.getOp(opPos + 1) - 1;
  opPos = OpMap.getFirstChildPos(opPos);
  int funcID = compiler.getOp(opPos);
  //  System.out.println("funcID: "+funcID);
  //  System.out.println("opPos: "+opPos);
  //  System.out.println("endFunc: "+endFunc);
  switch(funcID)
  {
    case FunctionTable.FUNC_LAST:
    case FunctionTable.FUNC_POSITION:
      return true;
    default:
      opPos++;
      int i = 0;
      for (int p = opPos; p < endFunc; p = compiler.getNextOpPos(p), i++)
      {
        int innerExprOpPos = p+2;
        int argOp = compiler.getOp(innerExprOpPos);
        boolean prox = isProximateInnerExpr(compiler, innerExprOpPos);
        if(prox)
          return true;
      }

  }
  return false;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:30,代码来源:WalkerFactory.java


示例4: isProximateInnerExpr

import com.sun.org.apache.xpath.internal.compiler.OpMap; //导入依赖的package包/类
static boolean isProximateInnerExpr(Compiler compiler, int opPos)
{
  int op = compiler.getOp(opPos);
  int innerExprOpPos = opPos+2;
  switch(op)
  {
    case OpCodes.OP_ARGUMENT:
      if(isProximateInnerExpr(compiler, innerExprOpPos))
        return true;
      break;
    case OpCodes.OP_VARIABLE:
    case OpCodes.OP_NUMBERLIT:
    case OpCodes.OP_LITERAL:
    case OpCodes.OP_LOCATIONPATH:
      break; // OK
    case OpCodes.OP_FUNCTION:
      boolean isProx = functionProximateOrContainsProximate(compiler, opPos);
      if(isProx)
        return true;
      break;
    case OpCodes.OP_GT:
    case OpCodes.OP_GTE:
    case OpCodes.OP_LT:
    case OpCodes.OP_LTE:
    case OpCodes.OP_EQUALS:
      int leftPos = OpMap.getFirstChildPos(op);
      int rightPos = compiler.getNextOpPos(leftPos);
      isProx = isProximateInnerExpr(compiler, leftPos);
      if(isProx)
        return true;
      isProx = isProximateInnerExpr(compiler, rightPos);
      if(isProx)
        return true;
      break;
    default:
      return true; // be conservative...
  }
  return false;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:40,代码来源:WalkerFactory.java


示例5: OneStepIteratorForward

import com.sun.org.apache.xpath.internal.compiler.OpMap; //导入依赖的package包/类
/**
 * Create a OneStepIterator object.
 *
 * @param compiler A reference to the Compiler that contains the op map.
 * @param opPos The position within the op map, which contains the
 * location path expression for this itterator.
 *
 * @throws javax.xml.transform.TransformerException
 */
OneStepIteratorForward(Compiler compiler, int opPos, int analysis)
        throws javax.xml.transform.TransformerException
{
  super(compiler, opPos, analysis);
  int firstStepPos = OpMap.getFirstChildPos(opPos);

  m_axis = WalkerFactory.getAxisFromStep(compiler, firstStepPos);

}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:19,代码来源:OneStepIteratorForward.java


示例6: WalkingIterator

import com.sun.org.apache.xpath.internal.compiler.OpMap; //导入依赖的package包/类
/**
 * Create a WalkingIterator iterator, including creation
 * of step walkers from the opcode list, and call back
 * into the Compiler to create predicate expressions.
 *
 * @param compiler The Compiler which is creating
 * this expression.
 * @param opPos The position of this iterator in the
 * opcode list from the compiler.
 * @param shouldLoadWalkers True if walkers should be
 * loaded, or false if this is a derived iterator and
 * it doesn't wish to load child walkers.
 *
 * @throws javax.xml.transform.TransformerException
 */
WalkingIterator(
        Compiler compiler, int opPos, int analysis, boolean shouldLoadWalkers)
          throws javax.xml.transform.TransformerException
{
  super(compiler, opPos, analysis, shouldLoadWalkers);

  int firstStepPos = OpMap.getFirstChildPos(opPos);

  if (shouldLoadWalkers)
  {
    m_firstWalker = WalkerFactory.loadWalkers(this, compiler, firstStepPos, 0);
    m_lastUsedWalker = m_firstWalker;
  }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:30,代码来源:WalkingIterator.java


示例7: UnionPathIterator

import com.sun.org.apache.xpath.internal.compiler.OpMap; //导入依赖的package包/类
/**
 * Create a UnionPathIterator object, including creation
 * of location path iterators from the opcode list, and call back
 * into the Compiler to create predicate expressions.
 *
 * @param compiler The Compiler which is creating
 * this expression.
 * @param opPos The position of this iterator in the
 * opcode list from the compiler.
 *
 * @throws javax.xml.transform.TransformerException
 */
public UnionPathIterator(Compiler compiler, int opPos)
        throws javax.xml.transform.TransformerException
{

  super();

  opPos = OpMap.getFirstChildPos(opPos);

  loadLocationPaths(compiler, opPos, 0);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:23,代码来源:UnionPathIterator.java



注:本文中的com.sun.org.apache.xpath.internal.compiler.OpMap类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java Call类代码示例发布时间:2022-05-23
下一篇:
Java FastInfosetFeature类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap