src/share/jaxws_classes/com/sun/tools/internal/jxc/gen/config/NGCCInterleaveFilter.java

Print this page




  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package com.sun.tools.internal.jxc.gen.config;
  27 
  28 import org.xml.sax.Attributes;
  29 import org.xml.sax.SAXException;
  30 
  31 /**
  32  * Dispatches incoming events into sub handlers appropriately
  33  * so that the interleaving semantics will be correctly realized.
  34  *



  35  * @author Kohsuke Kawaguchi (kk@kohsuke.org)
  36  */
  37 public abstract class NGCCInterleaveFilter implements NGCCEventSource, NGCCEventReceiver {
  38     protected NGCCInterleaveFilter( NGCCHandler parent, int cookie ) {
  39         this._parent = parent;
  40         this._cookie = cookie;
  41     }
  42 
  43     protected void setHandlers( NGCCEventReceiver[] receivers ) {
  44         this._receivers = receivers;
  45     }
  46 
  47     /** event receiverse. */
  48     protected NGCCEventReceiver[] _receivers;
  49 
  50     public int replace(NGCCEventReceiver oldHandler, NGCCEventReceiver newHandler) {
  51         for( int i=0; i<_receivers.length; i++ )
  52             if( _receivers[i]==oldHandler ) {
  53                 _receivers[i]=newHandler;
  54                 return i;




  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package com.sun.tools.internal.jxc.gen.config;
  27 
  28 import org.xml.sax.Attributes;
  29 import org.xml.sax.SAXException;
  30 
  31 /**
  32  * Dispatches incoming events into sub handlers appropriately
  33  * so that the interleaving semantics will be correctly realized.
  34  *
  35  * <p><b>
  36  *     Auto-generated, do not edit.
  37  * </b></p>
  38  * @author Kohsuke Kawaguchi (kk@kohsuke.org)
  39  */
  40 public abstract class NGCCInterleaveFilter implements NGCCEventSource, NGCCEventReceiver {
  41     protected NGCCInterleaveFilter( NGCCHandler parent, int cookie ) {
  42         this._parent = parent;
  43         this._cookie = cookie;
  44     }
  45 
  46     protected void setHandlers( NGCCEventReceiver[] receivers ) {
  47         this._receivers = receivers;
  48     }
  49 
  50     /** event receiverse. */
  51     protected NGCCEventReceiver[] _receivers;
  52 
  53     public int replace(NGCCEventReceiver oldHandler, NGCCEventReceiver newHandler) {
  54         for( int i=0; i<_receivers.length; i++ )
  55             if( _receivers[i]==oldHandler ) {
  56                 _receivers[i]=newHandler;
  57                 return i;