morten      01/09/20 07:23:25

  Modified:    java/src/org/apache/xalan/xsltc/compiler/util
                        MethodGenerator.java
  Log:
  Added shortcut to call the reset() method on any iterator.
  PR:           n/a
  Obtained from:        n/a
  Submitted by: [EMAIL PROTECTED]
  Reviewed by:  [EMAIL PROTECTED]
  
  Revision  Changes    Path
  1.6       +10 -1     
xml-xalan/java/src/org/apache/xalan/xsltc/compiler/util/MethodGenerator.java
  
  Index: MethodGenerator.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/compiler/util/MethodGenerator.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- MethodGenerator.java      2001/08/27 09:07:21     1.5
  +++ MethodGenerator.java      2001/09/20 14:23:25     1.6
  @@ -1,5 +1,5 @@
   /*
  - * @(#)$Id: MethodGenerator.java,v 1.5 2001/08/27 09:07:21 morten Exp $
  + * @(#)$Id: MethodGenerator.java,v 1.6 2001/09/20 14:23:25 morten Exp $
    *
    * The Apache Software License, Version 1.1
    *
  @@ -99,6 +99,7 @@
       private final Instruction _namespace;
   
       private final Instruction _setStartNode;
  +    private final Instruction _reset;
       private final Instruction _nextNode;
   
       private SlotAllocator _slotAllocator;
  @@ -162,6 +163,10 @@
                                          SET_START_NODE,
                                          SET_START_NODE_SIG);
        _setStartNode = new INVOKEINTERFACE(index, 2);
  +
  +     index = cpg.addInterfaceMethodref(NODE_ITERATOR,
  +                                       "reset", "()"+NODE_ITERATOR_SIG);
  +     _reset = new INVOKEINTERFACE(index, 1);
        
        index = cpg.addInterfaceMethodref(NODE_ITERATOR, NEXT, NEXT_SIG);
        _nextNode = new INVOKEINTERFACE(index, 1);
  @@ -215,6 +220,10 @@
       
       public final Instruction setStartNode() {
        return _setStartNode;
  +    }
  +
  +    public final Instruction reset() {
  +     return _reset;
       }
       
       public final Instruction nextNode() {
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to