com.sun.org.apache.xpath.internal.XPathVisitor Java Examples

The following examples show how to use com.sun.org.apache.xpath.internal.XPathVisitor. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: PredicatedNodeTest.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
/**
 * 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);
      }

    }
  }
}
 
Example #2
Source File: StepPattern.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
/**
 * 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);
  }
}
 
Example #3
Source File: StepPattern.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * 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);
  }
}
 
Example #4
Source File: PredicatedNodeTest.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * 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);
      }

    }
  }
}
 
Example #5
Source File: PredicatedNodeTest.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
/**
 * 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);
      }

    }
  }
}
 
Example #6
Source File: WalkingIterator.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * @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);
                      }
              }
}
 
Example #7
Source File: LocPathIterator.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * @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);
              }
}
 
Example #8
Source File: UnionPathIterator.java    From JDKSourceCode1.8 with MIT License 5 votes vote down vote up
/**
 * @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);
                              }
                      }
              }
}
 
Example #9
Source File: LocPathIterator.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * @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);
              }
}
 
Example #10
Source File: UnaryOperation.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * @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);
      }
}
 
Example #11
Source File: Operation.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * @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);
      }
}
 
Example #12
Source File: WalkingIterator.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * @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);
                      }
              }
}
 
Example #13
Source File: Function.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * @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);
      }
}
 
Example #14
Source File: UnionPattern.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * @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);
              }
      }
}
 
Example #15
Source File: Operation.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
/**
 * @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);
      }
}
 
Example #16
Source File: Function2Args.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
/**
 * @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);
}
 
Example #17
Source File: Function3Args.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * @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);
}
 
Example #18
Source File: WalkingIterator.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/**
 * @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);
                      }
              }
}
 
Example #19
Source File: UnionPathIterator.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/**
 * @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);
                              }
                      }
              }
}
 
Example #20
Source File: UnaryOperation.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * @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);
      }
}
 
Example #21
Source File: UnaryOperation.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
/**
 * @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);
      }
}
 
Example #22
Source File: Function2Args.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * @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);
}
 
Example #23
Source File: UnaryOperation.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * @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);
      }
}
 
Example #24
Source File: FuncExtFunction.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/**
 * 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);
    }

}
 
Example #25
Source File: WalkingIterator.java    From JDKSourceCode1.8 with MIT License 5 votes vote down vote up
/**
 * @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);
                      }
              }
}
 
Example #26
Source File: LocPathIterator.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/**
 * @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);
              }
}
 
Example #27
Source File: LocPathIterator.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * @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);
              }
}
 
Example #28
Source File: StepPattern.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
/**
 * @see com.sun.org.apache.xpath.internal.XPathVisitable#callVisitors(ExpressionOwner, XPathVisitor)
 */
public void callVisitors(ExpressionOwner owner, XPathVisitor visitor)
{
              if(visitor.visitMatchPattern(owner, this))
              {
                      callSubtreeVisitors(visitor);
              }
}
 
Example #29
Source File: StepPattern.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * @see com.sun.org.apache.xpath.internal.XPathVisitable#callVisitors(ExpressionOwner, XPathVisitor)
 */
public void callVisitors(ExpressionOwner owner, XPathVisitor visitor)
{
              if(visitor.visitMatchPattern(owner, this))
              {
                      callSubtreeVisitors(visitor);
              }
}
 
Example #30
Source File: FunctionMultiArgs.java    From Bytecoder with Apache License 2.0 5 votes vote down vote up
/**
 * @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);
    }
  }
}