Java源码示例:com.sun.org.apache.xpath.internal.XPathVisitor
示例1
/**
* This will traverse the heararchy, calling the visitor for
* each member. If the called visitor method returns
* false, the subtree should not be called.
*
* @param visitor The visitor whose appropriate method will be called.
*/
public void callPredicateVisitors(XPathVisitor visitor)
{
if (null != m_predicates)
{
int n = m_predicates.length;
for (int i = 0; i < n; i++)
{
ExpressionOwner predOwner = new PredOwner(i);
if (visitor.visitPredicate(predOwner, m_predicates[i]))
{
m_predicates[i].callVisitors(predOwner, visitor);
}
}
}
}
示例2
/**
* This will traverse the heararchy, calling the visitor for
* each member. If the called visitor method returns
* false, the subtree should not be called.
*
* @param visitor The visitor whose appropriate method will be called.
*/
public void callPredicateVisitors(XPathVisitor visitor)
{
if (null != m_predicates)
{
int n = m_predicates.length;
for (int i = 0; i < n; i++)
{
ExpressionOwner predOwner = new PredOwner(i);
if (visitor.visitPredicate(predOwner, m_predicates[i]))
{
m_predicates[i].callVisitors(predOwner, visitor);
}
}
}
}
示例3
/**
* Call the visitors on the subtree. Factored out from callVisitors
* so it may be called by derived classes.
*/
protected void callSubtreeVisitors(XPathVisitor visitor)
{
if (null != m_predicates)
{
int n = m_predicates.length;
for (int i = 0; i < n; i++)
{
ExpressionOwner predOwner = new PredOwner(i);
if (visitor.visitPredicate(predOwner, m_predicates[i]))
{
m_predicates[i].callVisitors(predOwner, visitor);
}
}
}
if (null != m_relativePathPattern)
{
m_relativePathPattern.callVisitors(this, visitor);
}
}
示例4
/**
* This will traverse the heararchy, calling the visitor for
* each member. If the called visitor method returns
* false, the subtree should not be called.
*
* @param visitor The visitor whose appropriate method will be called.
*/
public void callPredicateVisitors(XPathVisitor visitor)
{
if (null != m_predicates)
{
int n = m_predicates.length;
for (int i = 0; i < n; i++)
{
ExpressionOwner predOwner = new PredOwner(i);
if (visitor.visitPredicate(predOwner, m_predicates[i]))
{
m_predicates[i].callVisitors(predOwner, visitor);
}
}
}
}
示例5
/**
* Call the visitors on the subtree. Factored out from callVisitors
* so it may be called by derived classes.
*/
protected void callSubtreeVisitors(XPathVisitor visitor)
{
if (null != m_predicates)
{
int n = m_predicates.length;
for (int i = 0; i < n; i++)
{
ExpressionOwner predOwner = new PredOwner(i);
if (visitor.visitPredicate(predOwner, m_predicates[i]))
{
m_predicates[i].callVisitors(predOwner, visitor);
}
}
}
if (null != m_relativePathPattern)
{
m_relativePathPattern.callVisitors(this, visitor);
}
}
示例6
/**
* @see com.sun.org.apache.xpath.internal.XPathVisitable#callVisitors(ExpressionOwner, XPathVisitor)
*/
public void callVisitors(ExpressionOwner owner, XPathVisitor visitor)
{
if(visitor.visitUnionPath(owner, this))
{
if(null != m_exprs)
{
int n = m_exprs.length;
for(int i = 0; i < n; i++)
{
m_exprs[i].callVisitors(new iterOwner(i), visitor);
}
}
}
}
示例7
/**
* @see com.sun.org.apache.xpath.internal.XPathVisitable#callVisitors(ExpressionOwner, XPathVisitor)
*/
public void callArgVisitors(XPathVisitor visitor)
{
super.callArgVisitors(visitor);
if (null != m_args)
{
int n = m_args.length;
for (int i = 0; i < n; i++)
{
m_args[i].callVisitors(new ArgMultiOwner(i), visitor);
}
}
}
示例8
/**
* @see com.sun.org.apache.xpath.internal.XPathVisitable#callVisitors(ExpressionOwner, XPathVisitor)
*/
public void callVisitors(ExpressionOwner owner, XPathVisitor visitor)
{
if(visitor.visitLocationPath(owner, this))
{
if(null != m_firstWalker)
{
m_firstWalker.callVisitors(this, visitor);
}
}
}
示例9
/**
* 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);
}
}
示例10
/**
* @see com.sun.org.apache.xpath.internal.XPathVisitable#callVisitors(ExpressionOwner, XPathVisitor)
*/
public void callVisitors(ExpressionOwner owner, XPathVisitor visitor)
{
if(visitor.visitFunction(owner, this))
{
callArgVisitors(visitor);
}
}
示例11
/**
* @see com.sun.org.apache.xpath.internal.XPathVisitable#callVisitors(ExpressionOwner, XPathVisitor)
*/
public void callVisitors(ExpressionOwner owner, XPathVisitor visitor)
{
if(visitor.visitLocationPath(owner, this))
{
if(null != m_firstWalker)
{
m_firstWalker.callVisitors(this, visitor);
}
}
}
示例12
/**
* @see com.sun.org.apache.xpath.internal.XPathVisitable#callVisitors(ExpressionOwner, XPathVisitor)
*/
public void callVisitors(ExpressionOwner owner, XPathVisitor visitor)
{
if(visitor.visitLocationPath(owner, this))
{
if(null != m_firstWalker)
{
m_firstWalker.callVisitors(this, visitor);
}
}
}
示例13
/**
* @see com.sun.org.apache.xpath.internal.XPathVisitable#callVisitors(ExpressionOwner, XPathVisitor)
*/
public void callVisitors(ExpressionOwner owner, XPathVisitor visitor)
{
visitor.visitUnionPattern(owner, this);
if(null != m_patterns)
{
int n = m_patterns.length;
for(int i = 0; i < n; i++)
{
m_patterns[i].callVisitors(new UnionPathPartOwner(i), visitor);
}
}
}
示例14
/**
* @see com.sun.org.apache.xpath.internal.XPathVisitable#callVisitors(ExpressionOwner, XPathVisitor)
*/
public void callArgVisitors(XPathVisitor visitor)
{
super.callArgVisitors(visitor);
if(null != m_arg2)
m_arg2.callVisitors(new Arg2Owner(), visitor);
}
示例15
/**
* @see com.sun.org.apache.xpath.internal.XPathVisitable#callVisitors(ExpressionOwner, XPathVisitor)
*/
public void callVisitors(ExpressionOwner owner, XPathVisitor visitor)
{
visitor.visitUnionPattern(owner, this);
if(null != m_patterns)
{
int n = m_patterns.length;
for(int i = 0; i < n; i++)
{
m_patterns[i].callVisitors(new UnionPathPartOwner(i), visitor);
}
}
}
示例16
/**
* This will traverse the heararchy, calling the visitor for
* each member. If the called visitor method returns
* false, the subtree should not be called.
*
* @param owner The owner of the visitor, where that path may be
* rewritten if needed.
* @param visitor The visitor whose appropriate method will be called.
*/
public void callVisitors(ExpressionOwner owner, XPathVisitor visitor)
{
if(visitor.visitStep(owner, this))
{
callPredicateVisitors(visitor);
if(null != m_nextWalker)
{
m_nextWalker.callVisitors(this, visitor);
}
}
}
示例17
/**
* @see com.sun.org.apache.xpath.internal.XPathVisitable#callVisitors(ExpressionOwner, XPathVisitor)
*/
public void callArgVisitors(XPathVisitor visitor)
{
super.callArgVisitors(visitor);
if(null != m_arg2)
m_arg2.callVisitors(new Arg2Owner(), visitor);
}
示例18
/**
* @see com.sun.org.apache.xpath.internal.XPathVisitable#callVisitors(ExpressionOwner, XPathVisitor)
*/
public void callArgVisitors(XPathVisitor visitor)
{
super.callArgVisitors(visitor);
if (null != m_args)
{
int n = m_args.length;
for (int i = 0; i < n; i++)
{
m_args[i].callVisitors(new ArgMultiOwner(i), visitor);
}
}
}
示例19
/**
* @see com.sun.org.apache.xpath.internal.XPathVisitable#callVisitors(ExpressionOwner, XPathVisitor)
*/
public void callArgVisitors(XPathVisitor visitor)
{
super.callArgVisitors(visitor);
if(null != m_arg1)
m_arg1.callVisitors(new Arg1Owner(), visitor);
}
示例20
/**
* 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);
}
}
示例21
/**
* @see com.sun.org.apache.xpath.internal.XPathVisitable#callVisitors(ExpressionOwner, XPathVisitor)
*/
public void callVisitors(ExpressionOwner owner, XPathVisitor visitor)
{
if(visitor.visitFunction(owner, this))
{
callArgVisitors(visitor);
}
}
示例22
/**
* @see com.sun.org.apache.xpath.internal.XPathVisitable#callVisitors(ExpressionOwner, XPathVisitor)
*/
public void callArgVisitors(XPathVisitor visitor)
{
super.callArgVisitors(visitor);
if(null != m_arg1)
m_arg1.callVisitors(new Arg1Owner(), visitor);
}
示例23
/**
* @see com.sun.org.apache.xpath.internal.XPathVisitable#callVisitors(ExpressionOwner, XPathVisitor)
*/
public void callVisitors(ExpressionOwner owner, XPathVisitor visitor)
{
if(visitor.visitBinaryOperation(owner, this))
{
m_left.callVisitors(new LeftExprOwner(), visitor);
m_right.callVisitors(this, visitor);
}
}
示例24
/**
* @see com.sun.org.apache.xpath.internal.XPathVisitable#callVisitors(ExpressionOwner, XPathVisitor)
*/
public void callVisitors(ExpressionOwner owner, XPathVisitor visitor)
{
if(visitor.visitLocationPath(owner, this))
{
if(null != m_firstWalker)
{
m_firstWalker.callVisitors(this, visitor);
}
}
}
示例25
/**
* @see com.sun.org.apache.xpath.internal.XPathVisitable#callVisitors(ExpressionOwner, XPathVisitor)
*/
public void callVisitors(ExpressionOwner owner, XPathVisitor visitor)
{
if(visitor.visitBinaryOperation(owner, this))
{
m_left.callVisitors(new LeftExprOwner(), visitor);
m_right.callVisitors(this, visitor);
}
}
示例26
/**
* @see com.sun.org.apache.xpath.internal.XPathVisitable#callVisitors(ExpressionOwner, XPathVisitor)
*/
public void callVisitors(ExpressionOwner owner, XPathVisitor visitor)
{
if(visitor.visitUnaryOperation(owner, this))
{
m_right.callVisitors(this, visitor);
}
}
示例27
/**
* @see com.sun.org.apache.xpath.internal.XPathVisitable#callVisitors(ExpressionOwner, XPathVisitor)
*/
public void callVisitors(ExpressionOwner owner, XPathVisitor visitor)
{
if(visitor.visitLocationPath(owner, this))
{
visitor.visitStep(owner, this);
callPredicateVisitors(visitor);
}
}
示例28
/**
* @see com.sun.org.apache.xpath.internal.XPathVisitable#callVisitors(ExpressionOwner, XPathVisitor)
*/
public void callVisitors(ExpressionOwner owner, XPathVisitor visitor)
{
if(visitor.visitUnionPath(owner, this))
{
if(null != m_exprs)
{
int n = m_exprs.length;
for(int i = 0; i < n; i++)
{
m_exprs[i].callVisitors(new iterOwner(i), visitor);
}
}
}
}
示例29
/**
* @see com.sun.org.apache.xpath.internal.XPathVisitable#callVisitors(ExpressionOwner, XPathVisitor)
*/
public void callVisitors(ExpressionOwner owner, XPathVisitor visitor)
{
if(visitor.visitLocationPath(owner, this))
{
visitor.visitStep(owner, this);
callPredicateVisitors(visitor);
}
}
示例30
/**
* @see com.sun.org.apache.xpath.internal.XPathVisitable#callVisitors(ExpressionOwner, XPathVisitor)
*/
public void callVisitors(ExpressionOwner owner, XPathVisitor visitor)
{
if(visitor.visitLocationPath(owner, this))
{
if(null != m_firstWalker)
{
m_firstWalker.callVisitors(this, visitor);
}
}
}