本文整理汇总了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;
}
示例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);
}
}