Java Code Examples for com.sun.org.apache.xpath.internal.compiler.OpCodes#ENDOP

The following examples show how to use com.sun.org.apache.xpath.internal.compiler.OpCodes#ENDOP . 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: WalkerFactory.java    From jdk1.8-source-analysis with Apache License 2.0 6 votes vote down vote up
/**
 * This method is for building an array of possible levels
 * where the target element(s) could be found for a match.
 * @param lpi The owning location path iterator.
 * @param compiler non-null reference to compiler object that has processed
 *                 the XPath operations into an opcode map.
 * @param stepOpCodePos The opcode position for the step.
 *
 * @return non-null AxesWalker derivative.
 *
 * @throws javax.xml.transform.TransformerException
 * @xsl.usage advanced
 */
static AxesWalker loadOneWalker(
        WalkingIterator lpi, Compiler compiler, int stepOpCodePos)
          throws javax.xml.transform.TransformerException
{

  AxesWalker firstWalker = null;
  int stepType = compiler.getOp(stepOpCodePos);

  if (stepType != OpCodes.ENDOP)
  {

    // m_axesWalkers = new AxesWalker[1];
    // As we unwind from the recursion, create the iterators.
    firstWalker = createDefaultWalker(compiler, stepType, lpi, 0);

    firstWalker.init(compiler, stepOpCodePos, stepType);
  }

  return firstWalker;
}
 
Example 2
Source File: WalkerFactory.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * This method is for building an array of possible levels
 * where the target element(s) could be found for a match.
 * @param lpi The owning location path iterator.
 * @param compiler non-null reference to compiler object that has processed
 *                 the XPath operations into an opcode map.
 * @param stepOpCodePos The opcode position for the step.
 *
 * @return non-null AxesWalker derivative.
 *
 * @throws javax.xml.transform.TransformerException
 * @xsl.usage advanced
 */
static AxesWalker loadOneWalker(
        WalkingIterator lpi, Compiler compiler, int stepOpCodePos)
          throws javax.xml.transform.TransformerException
{

  AxesWalker firstWalker = null;
  int stepType = compiler.getOp(stepOpCodePos);

  if (stepType != OpCodes.ENDOP)
  {

    // m_axesWalkers = new AxesWalker[1];
    // As we unwind from the recursion, create the iterators.
    firstWalker = createDefaultWalker(compiler, stepType, lpi, 0);

    firstWalker.init(compiler, stepOpCodePos, stepType);
  }

  return firstWalker;
}
 
Example 3
Source File: WalkerFactory.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * This method is for building an array of possible levels
 * where the target element(s) could be found for a match.
 * @param lpi The owning location path iterator.
 * @param compiler non-null reference to compiler object that has processed
 *                 the XPath operations into an opcode map.
 * @param stepOpCodePos The opcode position for the step.
 *
 * @return non-null AxesWalker derivative.
 *
 * @throws javax.xml.transform.TransformerException
 * @xsl.usage advanced
 */
static AxesWalker loadOneWalker(
        WalkingIterator lpi, Compiler compiler, int stepOpCodePos)
          throws javax.xml.transform.TransformerException
{

  AxesWalker firstWalker = null;
  int stepType = compiler.getOp(stepOpCodePos);

  if (stepType != OpCodes.ENDOP)
  {

    // m_axesWalkers = new AxesWalker[1];
    // As we unwind from the recursion, create the iterators.
    firstWalker = createDefaultWalker(compiler, stepType, lpi, 0);

    firstWalker.init(compiler, stepOpCodePos, stepType);
  }

  return firstWalker;
}
 
Example 4
Source File: WalkerFactory.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * This method is for building an array of possible levels
 * where the target element(s) could be found for a match.
 * @param lpi The owning location path iterator.
 * @param compiler non-null reference to compiler object that has processed
 *                 the XPath operations into an opcode map.
 * @param stepOpCodePos The opcode position for the step.
 *
 * @return non-null AxesWalker derivative.
 *
 * @throws javax.xml.transform.TransformerException
 * @xsl.usage advanced
 */
static AxesWalker loadOneWalker(
        WalkingIterator lpi, Compiler compiler, int stepOpCodePos)
          throws javax.xml.transform.TransformerException
{

  AxesWalker firstWalker = null;
  int stepType = compiler.getOp(stepOpCodePos);

  if (stepType != OpCodes.ENDOP)
  {

    // m_axesWalkers = new AxesWalker[1];
    // As we unwind from the recursion, create the iterators.
    firstWalker = createDefaultWalker(compiler, stepType, lpi, 0);

    firstWalker.init(compiler, stepOpCodePos, stepType);
  }

  return firstWalker;
}
 
Example 5
Source File: WalkerFactory.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
/**
 * This method is for building an array of possible levels
 * where the target element(s) could be found for a match.
 * @param lpi The owning location path iterator.
 * @param compiler non-null reference to compiler object that has processed
 *                 the XPath operations into an opcode map.
 * @param stepOpCodePos The opcode position for the step.
 *
 * @return non-null AxesWalker derivative.
 *
 * @throws javax.xml.transform.TransformerException
 * @xsl.usage advanced
 */
static AxesWalker loadOneWalker(
        WalkingIterator lpi, Compiler compiler, int stepOpCodePos)
          throws javax.xml.transform.TransformerException
{

  AxesWalker firstWalker = null;
  int stepType = compiler.getOp(stepOpCodePos);

  if (stepType != OpCodes.ENDOP)
  {

    // m_axesWalkers = new AxesWalker[1];
    // As we unwind from the recursion, create the iterators.
    firstWalker = createDefaultWalker(compiler, stepType, lpi, 0);

    firstWalker.init(compiler, stepOpCodePos, stepType);
  }

  return firstWalker;
}
 
Example 6
Source File: WalkerFactory.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
/**
 * This method is for building an array of possible levels
 * where the target element(s) could be found for a match.
 * @param lpi The owning location path iterator.
 * @param compiler non-null reference to compiler object that has processed
 *                 the XPath operations into an opcode map.
 * @param stepOpCodePos The opcode position for the step.
 *
 * @return non-null AxesWalker derivative.
 *
 * @throws javax.xml.transform.TransformerException
 * @xsl.usage advanced
 */
static AxesWalker loadOneWalker(
        WalkingIterator lpi, Compiler compiler, int stepOpCodePos)
          throws javax.xml.transform.TransformerException
{

  AxesWalker firstWalker = null;
  int stepType = compiler.getOp(stepOpCodePos);

  if (stepType != OpCodes.ENDOP)
  {

    // m_axesWalkers = new AxesWalker[1];
    // As we unwind from the recursion, create the iterators.
    firstWalker = createDefaultWalker(compiler, stepType, lpi, 0);

    firstWalker.init(compiler, stepOpCodePos, stepType);
  }

  return firstWalker;
}
 
Example 7
Source File: WalkerFactory.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * This method is for building an array of possible levels
 * where the target element(s) could be found for a match.
 * @param lpi The owning location path iterator.
 * @param compiler non-null reference to compiler object that has processed
 *                 the XPath operations into an opcode map.
 * @param stepOpCodePos The opcode position for the step.
 *
 * @return non-null AxesWalker derivative.
 *
 * @throws javax.xml.transform.TransformerException
 * @xsl.usage advanced
 */
static AxesWalker loadOneWalker(
        WalkingIterator lpi, Compiler compiler, int stepOpCodePos)
          throws javax.xml.transform.TransformerException
{

  AxesWalker firstWalker = null;
  int stepType = compiler.getOp(stepOpCodePos);

  if (stepType != OpCodes.ENDOP)
  {

    // m_axesWalkers = new AxesWalker[1];
    // As we unwind from the recursion, create the iterators.
    firstWalker = createDefaultWalker(compiler, stepType, lpi, 0);

    firstWalker.init(compiler, stepOpCodePos, stepType);
  }

  return firstWalker;
}
 
Example 8
Source File: WalkerFactory.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
/**
 * This method is for building an array of possible levels
 * where the target element(s) could be found for a match.
 * @param lpi The owning location path iterator.
 * @param compiler non-null reference to compiler object that has processed
 *                 the XPath operations into an opcode map.
 * @param stepOpCodePos The opcode position for the step.
 *
 * @return non-null AxesWalker derivative.
 *
 * @throws javax.xml.transform.TransformerException
 * @xsl.usage advanced
 */
static AxesWalker loadOneWalker(
        WalkingIterator lpi, Compiler compiler, int stepOpCodePos)
          throws javax.xml.transform.TransformerException
{

  AxesWalker firstWalker = null;
  int stepType = compiler.getOp(stepOpCodePos);

  if (stepType != OpCodes.ENDOP)
  {

    // m_axesWalkers = new AxesWalker[1];
    // As we unwind from the recursion, create the iterators.
    firstWalker = createDefaultWalker(compiler, stepType, lpi, 0);

    firstWalker.init(compiler, stepOpCodePos, stepType);
  }

  return firstWalker;
}
 
Example 9
Source File: WalkerFactory.java    From Bytecoder with Apache License 2.0 6 votes vote down vote up
/**
 * This method is for building an array of possible levels
 * where the target element(s) could be found for a match.
 * @param lpi The owning location path iterator.
 * @param compiler non-null reference to compiler object that has processed
 *                 the XPath operations into an opcode map.
 * @param stepOpCodePos The opcode position for the step.
 *
 * @return non-null AxesWalker derivative.
 *
 * @throws javax.xml.transform.TransformerException
 * @xsl.usage advanced
 */
static AxesWalker loadOneWalker(
        WalkingIterator lpi, Compiler compiler, int stepOpCodePos)
          throws javax.xml.transform.TransformerException
{

  AxesWalker firstWalker = null;
  int stepType = compiler.getOp(stepOpCodePos);

  if (stepType != OpCodes.ENDOP)
  {

    // m_axesWalkers = new AxesWalker[1];
    // As we unwind from the recursion, create the iterators.
    firstWalker = createDefaultWalker(compiler, stepType, lpi, 0);

    firstWalker.init(compiler, stepOpCodePos, stepType);
  }

  return firstWalker;
}
 
Example 10
Source File: WalkerFactory.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
/**
 * This method is for building an array of possible levels
 * where the target element(s) could be found for a match.
 * @param lpi The owning location path iterator object.
 * @param compiler non-null reference to compiler object that has processed
 *                 the XPath operations into an opcode map.
 * @param stepOpCodePos The opcode position for the step.
 * @param stepIndex The top-level step index withing the iterator.
 *
 * @return non-null AxesWalker derivative.
 *
 * @throws javax.xml.transform.TransformerException
 * @xsl.usage advanced
 */
static AxesWalker loadWalkers(
        WalkingIterator lpi, Compiler compiler, int stepOpCodePos, int stepIndex)
          throws javax.xml.transform.TransformerException
{

  int stepType;
  AxesWalker firstWalker = null;
  AxesWalker walker, prevWalker = null;

  int analysis = analyze(compiler, stepOpCodePos, stepIndex);

  while (OpCodes.ENDOP != (stepType = compiler.getOp(stepOpCodePos)))
  {
    walker = createDefaultWalker(compiler, stepOpCodePos, lpi, analysis);

    walker.init(compiler, stepOpCodePos, stepType);
    walker.exprSetParent(lpi);

    // walker.setAnalysis(analysis);
    if (null == firstWalker)
    {
      firstWalker = walker;
    }
    else
    {
      prevWalker.setNextWalker(walker);
      walker.setPrevWalker(prevWalker);
    }

    prevWalker = walker;
    stepOpCodePos = compiler.getNextStepPos(stepOpCodePos);

    if (stepOpCodePos < 0)
      break;
  }

  return firstWalker;
}
 
Example 11
Source File: WalkerFactory.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
/**
 * This method is for building an array of possible levels
 * where the target element(s) could be found for a match.
 * @param lpi The owning location path iterator object.
 * @param compiler non-null reference to compiler object that has processed
 *                 the XPath operations into an opcode map.
 * @param stepOpCodePos The opcode position for the step.
 * @param stepIndex The top-level step index withing the iterator.
 *
 * @return non-null AxesWalker derivative.
 *
 * @throws javax.xml.transform.TransformerException
 * @xsl.usage advanced
 */
static AxesWalker loadWalkers(
        WalkingIterator lpi, Compiler compiler, int stepOpCodePos, int stepIndex)
          throws javax.xml.transform.TransformerException
{

  int stepType;
  AxesWalker firstWalker = null;
  AxesWalker walker, prevWalker = null;

  int analysis = analyze(compiler, stepOpCodePos, stepIndex);

  while (OpCodes.ENDOP != (stepType = compiler.getOp(stepOpCodePos)))
  {
    walker = createDefaultWalker(compiler, stepOpCodePos, lpi, analysis);

    walker.init(compiler, stepOpCodePos, stepType);
    walker.exprSetParent(lpi);

    // walker.setAnalysis(analysis);
    if (null == firstWalker)
    {
      firstWalker = walker;
    }
    else
    {
      prevWalker.setNextWalker(walker);
      walker.setPrevWalker(prevWalker);
    }

    prevWalker = walker;
    stepOpCodePos = compiler.getNextStepPos(stepOpCodePos);

    if (stepOpCodePos < 0)
      break;
  }

  return firstWalker;
}
 
Example 12
Source File: WalkerFactory.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * This method is for building an array of possible levels
 * where the target element(s) could be found for a match.
 * @param lpi The owning location path iterator object.
 * @param compiler non-null reference to compiler object that has processed
 *                 the XPath operations into an opcode map.
 * @param stepOpCodePos The opcode position for the step.
 * @param stepIndex The top-level step index withing the iterator.
 *
 * @return non-null AxesWalker derivative.
 *
 * @throws javax.xml.transform.TransformerException
 * @xsl.usage advanced
 */
static AxesWalker loadWalkers(
        WalkingIterator lpi, Compiler compiler, int stepOpCodePos, int stepIndex)
          throws javax.xml.transform.TransformerException
{

  int stepType;
  AxesWalker firstWalker = null;
  AxesWalker walker, prevWalker = null;

  int analysis = analyze(compiler, stepOpCodePos, stepIndex);

  while (OpCodes.ENDOP != (stepType = compiler.getOp(stepOpCodePos)))
  {
    walker = createDefaultWalker(compiler, stepOpCodePos, lpi, analysis);

    walker.init(compiler, stepOpCodePos, stepType);
    walker.exprSetParent(lpi);

    // walker.setAnalysis(analysis);
    if (null == firstWalker)
    {
      firstWalker = walker;
    }
    else
    {
      prevWalker.setNextWalker(walker);
      walker.setPrevWalker(prevWalker);
    }

    prevWalker = walker;
    stepOpCodePos = compiler.getNextStepPos(stepOpCodePos);

    if (stepOpCodePos < 0)
      break;
  }

  return firstWalker;
}
 
Example 13
Source File: WalkerFactory.java    From Bytecoder with Apache License 2.0 5 votes vote down vote up
/**
 * This method is for building an array of possible levels
 * where the target element(s) could be found for a match.
 * @param lpi The owning location path iterator object.
 * @param compiler non-null reference to compiler object that has processed
 *                 the XPath operations into an opcode map.
 * @param stepOpCodePos The opcode position for the step.
 * @param stepIndex The top-level step index withing the iterator.
 *
 * @return non-null AxesWalker derivative.
 *
 * @throws javax.xml.transform.TransformerException
 * @xsl.usage advanced
 */
static AxesWalker loadWalkers(
        WalkingIterator lpi, Compiler compiler, int stepOpCodePos, int stepIndex)
          throws javax.xml.transform.TransformerException
{

  int stepType;
  AxesWalker firstWalker = null;
  AxesWalker walker, prevWalker = null;

  int analysis = analyze(compiler, stepOpCodePos, stepIndex);

  while (OpCodes.ENDOP != (stepType = compiler.getOp(stepOpCodePos)))
  {
    walker = createDefaultWalker(compiler, stepOpCodePos, lpi, analysis);

    walker.init(compiler, stepOpCodePos, stepType);
    walker.exprSetParent(lpi);

    // walker.setAnalysis(analysis);
    if (null == firstWalker)
    {
      firstWalker = walker;
    }
    else
    {
      prevWalker.setNextWalker(walker);
      walker.setPrevWalker(prevWalker);
    }

    prevWalker = walker;
    stepOpCodePos = compiler.getNextStepPos(stepOpCodePos);

    if (stepOpCodePos < 0)
      break;
  }

  return firstWalker;
}
 
Example 14
Source File: WalkerFactory.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/**
 * This method is for building an array of possible levels
 * where the target element(s) could be found for a match.
 * @param lpi The owning location path iterator object.
 * @param compiler non-null reference to compiler object that has processed
 *                 the XPath operations into an opcode map.
 * @param stepOpCodePos The opcode position for the step.
 * @param stepIndex The top-level step index withing the iterator.
 *
 * @return non-null AxesWalker derivative.
 *
 * @throws javax.xml.transform.TransformerException
 * @xsl.usage advanced
 */
static AxesWalker loadWalkers(
        WalkingIterator lpi, Compiler compiler, int stepOpCodePos, int stepIndex)
          throws javax.xml.transform.TransformerException
{

  int stepType;
  AxesWalker firstWalker = null;
  AxesWalker walker, prevWalker = null;

  int analysis = analyze(compiler, stepOpCodePos, stepIndex);

  while (OpCodes.ENDOP != (stepType = compiler.getOp(stepOpCodePos)))
  {
    walker = createDefaultWalker(compiler, stepOpCodePos, lpi, analysis);

    walker.init(compiler, stepOpCodePos, stepType);
    walker.exprSetParent(lpi);

    // walker.setAnalysis(analysis);
    if (null == firstWalker)
    {
      firstWalker = walker;
    }
    else
    {
      prevWalker.setNextWalker(walker);
      walker.setPrevWalker(prevWalker);
    }

    prevWalker = walker;
    stepOpCodePos = compiler.getNextStepPos(stepOpCodePos);

    if (stepOpCodePos < 0)
      break;
  }

  return firstWalker;
}
 
Example 15
Source File: WalkerFactory.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/**
 * This method is for building an array of possible levels
 * where the target element(s) could be found for a match.
 * @param lpi The owning location path iterator object.
 * @param compiler non-null reference to compiler object that has processed
 *                 the XPath operations into an opcode map.
 * @param stepOpCodePos The opcode position for the step.
 * @param stepIndex The top-level step index withing the iterator.
 *
 * @return non-null AxesWalker derivative.
 *
 * @throws javax.xml.transform.TransformerException
 * @xsl.usage advanced
 */
static AxesWalker loadWalkers(
        WalkingIterator lpi, Compiler compiler, int stepOpCodePos, int stepIndex)
          throws javax.xml.transform.TransformerException
{

  int stepType;
  AxesWalker firstWalker = null;
  AxesWalker walker, prevWalker = null;

  int analysis = analyze(compiler, stepOpCodePos, stepIndex);

  while (OpCodes.ENDOP != (stepType = compiler.getOp(stepOpCodePos)))
  {
    walker = createDefaultWalker(compiler, stepOpCodePos, lpi, analysis);

    walker.init(compiler, stepOpCodePos, stepType);
    walker.exprSetParent(lpi);

    // walker.setAnalysis(analysis);
    if (null == firstWalker)
    {
      firstWalker = walker;
    }
    else
    {
      prevWalker.setNextWalker(walker);
      walker.setPrevWalker(prevWalker);
    }

    prevWalker = walker;
    stepOpCodePos = compiler.getNextStepPos(stepOpCodePos);

    if (stepOpCodePos < 0)
      break;
  }

  return firstWalker;
}
 
Example 16
Source File: WalkerFactory.java    From JDKSourceCode1.8 with MIT License 5 votes vote down vote up
/**
 * This method is for building an array of possible levels
 * where the target element(s) could be found for a match.
 * @param lpi The owning location path iterator object.
 * @param compiler non-null reference to compiler object that has processed
 *                 the XPath operations into an opcode map.
 * @param stepOpCodePos The opcode position for the step.
 * @param stepIndex The top-level step index withing the iterator.
 *
 * @return non-null AxesWalker derivative.
 *
 * @throws javax.xml.transform.TransformerException
 * @xsl.usage advanced
 */
static AxesWalker loadWalkers(
        WalkingIterator lpi, Compiler compiler, int stepOpCodePos, int stepIndex)
          throws javax.xml.transform.TransformerException
{

  int stepType;
  AxesWalker firstWalker = null;
  AxesWalker walker, prevWalker = null;

  int analysis = analyze(compiler, stepOpCodePos, stepIndex);

  while (OpCodes.ENDOP != (stepType = compiler.getOp(stepOpCodePos)))
  {
    walker = createDefaultWalker(compiler, stepOpCodePos, lpi, analysis);

    walker.init(compiler, stepOpCodePos, stepType);
    walker.exprSetParent(lpi);

    // walker.setAnalysis(analysis);
    if (null == firstWalker)
    {
      firstWalker = walker;
    }
    else
    {
      prevWalker.setNextWalker(walker);
      walker.setPrevWalker(prevWalker);
    }

    prevWalker = walker;
    stepOpCodePos = compiler.getNextStepPos(stepOpCodePos);

    if (stepOpCodePos < 0)
      break;
  }

  return firstWalker;
}
 
Example 17
Source File: WalkerFactory.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * This method is for building an array of possible levels
 * where the target element(s) could be found for a match.
 * @param lpi The owning location path iterator object.
 * @param compiler non-null reference to compiler object that has processed
 *                 the XPath operations into an opcode map.
 * @param stepOpCodePos The opcode position for the step.
 * @param stepIndex The top-level step index withing the iterator.
 *
 * @return non-null AxesWalker derivative.
 *
 * @throws javax.xml.transform.TransformerException
 * @xsl.usage advanced
 */
static AxesWalker loadWalkers(
        WalkingIterator lpi, Compiler compiler, int stepOpCodePos, int stepIndex)
          throws javax.xml.transform.TransformerException
{

  int stepType;
  AxesWalker firstWalker = null;
  AxesWalker walker, prevWalker = null;

  int analysis = analyze(compiler, stepOpCodePos, stepIndex);

  while (OpCodes.ENDOP != (stepType = compiler.getOp(stepOpCodePos)))
  {
    walker = createDefaultWalker(compiler, stepOpCodePos, lpi, analysis);

    walker.init(compiler, stepOpCodePos, stepType);
    walker.exprSetParent(lpi);

    // walker.setAnalysis(analysis);
    if (null == firstWalker)
    {
      firstWalker = walker;
    }
    else
    {
      prevWalker.setNextWalker(walker);
      walker.setPrevWalker(prevWalker);
    }

    prevWalker = walker;
    stepOpCodePos = compiler.getNextStepPos(stepOpCodePos);

    if (stepOpCodePos < 0)
      break;
  }

  return firstWalker;
}
 
Example 18
Source File: WalkerFactory.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * This method is for building an array of possible levels
 * where the target element(s) could be found for a match.
 * @param lpi The owning location path iterator object.
 * @param compiler non-null reference to compiler object that has processed
 *                 the XPath operations into an opcode map.
 * @param stepOpCodePos The opcode position for the step.
 * @param stepIndex The top-level step index withing the iterator.
 *
 * @return non-null AxesWalker derivative.
 *
 * @throws javax.xml.transform.TransformerException
 * @xsl.usage advanced
 */
static AxesWalker loadWalkers(
        WalkingIterator lpi, Compiler compiler, int stepOpCodePos, int stepIndex)
          throws javax.xml.transform.TransformerException
{

  int stepType;
  AxesWalker firstWalker = null;
  AxesWalker walker, prevWalker = null;

  int analysis = analyze(compiler, stepOpCodePos, stepIndex);

  while (OpCodes.ENDOP != (stepType = compiler.getOp(stepOpCodePos)))
  {
    walker = createDefaultWalker(compiler, stepOpCodePos, lpi, analysis);

    walker.init(compiler, stepOpCodePos, stepType);
    walker.exprSetParent(lpi);

    // walker.setAnalysis(analysis);
    if (null == firstWalker)
    {
      firstWalker = walker;
    }
    else
    {
      prevWalker.setNextWalker(walker);
      walker.setPrevWalker(prevWalker);
    }

    prevWalker = walker;
    stepOpCodePos = compiler.getNextStepPos(stepOpCodePos);

    if (stepOpCodePos < 0)
      break;
  }

  return firstWalker;
}
 
Example 19
Source File: WalkerFactory.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * This method is for building an array of possible levels
 * where the target element(s) could be found for a match.
 * @param lpi The owning location path iterator object.
 * @param compiler non-null reference to compiler object that has processed
 *                 the XPath operations into an opcode map.
 * @param stepOpCodePos The opcode position for the step.
 * @param stepIndex The top-level step index withing the iterator.
 *
 * @return non-null AxesWalker derivative.
 *
 * @throws javax.xml.transform.TransformerException
 * @xsl.usage advanced
 */
static AxesWalker loadWalkers(
        WalkingIterator lpi, Compiler compiler, int stepOpCodePos, int stepIndex)
          throws javax.xml.transform.TransformerException
{

  int stepType;
  AxesWalker firstWalker = null;
  AxesWalker walker, prevWalker = null;

  int analysis = analyze(compiler, stepOpCodePos, stepIndex);

  while (OpCodes.ENDOP != (stepType = compiler.getOp(stepOpCodePos)))
  {
    walker = createDefaultWalker(compiler, stepOpCodePos, lpi, analysis);

    walker.init(compiler, stepOpCodePos, stepType);
    walker.exprSetParent(lpi);

    // walker.setAnalysis(analysis);
    if (null == firstWalker)
    {
      firstWalker = walker;
    }
    else
    {
      prevWalker.setNextWalker(walker);
      walker.setPrevWalker(prevWalker);
    }

    prevWalker = walker;
    stepOpCodePos = compiler.getNextStepPos(stepOpCodePos);

    if (stepOpCodePos < 0)
      break;
  }

  return firstWalker;
}
 
Example 20
Source File: WalkerFactory.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
/**
 * This method is for building an array of possible levels
 * where the target element(s) could be found for a match.
 * @param lpi The owning location path iterator object.
 * @param compiler non-null reference to compiler object that has processed
 *                 the XPath operations into an opcode map.
 * @param stepOpCodePos The opcode position for the step.
 * @param stepIndex The top-level step index withing the iterator.
 *
 * @return non-null AxesWalker derivative.
 *
 * @throws javax.xml.transform.TransformerException
 * @xsl.usage advanced
 */
static AxesWalker loadWalkers(
        WalkingIterator lpi, Compiler compiler, int stepOpCodePos, int stepIndex)
          throws javax.xml.transform.TransformerException
{

  int stepType;
  AxesWalker firstWalker = null;
  AxesWalker walker, prevWalker = null;

  int analysis = analyze(compiler, stepOpCodePos, stepIndex);

  while (OpCodes.ENDOP != (stepType = compiler.getOp(stepOpCodePos)))
  {
    walker = createDefaultWalker(compiler, stepOpCodePos, lpi, analysis);

    walker.init(compiler, stepOpCodePos, stepType);
    walker.exprSetParent(lpi);

    // walker.setAnalysis(analysis);
    if (null == firstWalker)
    {
      firstWalker = walker;
    }
    else
    {
      prevWalker.setNextWalker(walker);
      walker.setPrevWalker(prevWalker);
    }

    prevWalker = walker;
    stepOpCodePos = compiler.getNextStepPos(stepOpCodePos);

    if (stepOpCodePos < 0)
      break;
  }

  return firstWalker;
}