当前位置: 首页>>代码示例>>Java>>正文


Java Expression.callVisitors方法代码示例

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


在下文中一共展示了Expression.callVisitors方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: visitPredicate

import com.sun.org.apache.xpath.internal.Expression; //导入方法依赖的package包/类
/**
 * Visit a predicate within a location path.  Note that there isn't a
 * proper unique component for predicates, and that the expression will
 * be called also for whatever type Expression is.
 *
 * @param owner The owner of the expression, to which the expression can
 *              be reset if rewriting takes place.
 * @param pred The predicate object.
 * @return true if the sub expressions should be traversed.
 */
public boolean visitPredicate(ExpressionOwner owner, Expression pred)
{
  m_predDepth++;

  if(m_predDepth == 1)
  {
    if((pred instanceof Variable) ||
       (pred instanceof XNumber) ||
       (pred instanceof Div) ||
       (pred instanceof Plus) ||
       (pred instanceof Minus) ||
       (pred instanceof Mod) ||
       (pred instanceof Quo) ||
       (pred instanceof Mult) ||
       (pred instanceof com.sun.org.apache.xpath.internal.operations.Number) ||
       (pred instanceof Function))
        m_hasPositionalPred = true;
    else
      pred.callVisitors(owner, this);
  }

  m_predDepth--;

  // Don't go have the caller go any further down the subtree.
  return false;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:37,代码来源:HasPositionalPredChecker.java

示例2: callArgVisitors

import com.sun.org.apache.xpath.internal.Expression; //导入方法依赖的package包/类
/**
 * Call the visitors for the function arguments.
 */
public void callArgVisitors(XPathVisitor visitor)
{
    for (int i = 0; i < m_argVec.size(); i++)
    {
       Expression exp = (Expression)m_argVec.elementAt(i);
       exp.callVisitors(new ArgExtOwner(exp), visitor);
    }

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


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