Clover coverage report - JFox Service-Oriented Application Framework - 1.0-M2
Coverage timestamp: 星期四 十一月 25 2004 17:14:11 PST
file stats: LOC: 208   Methods: 16
NCLOC: 98   Classes: 1
30 day Evaluation Version distributed via the Maven Jar Repository. Clover is not free. You have 30 days to evaluate it. Please visit http://www.thecortex.net/clover to obtain a licensed version of Clover
 
 Source file Conditionals Statements Methods TOTAL
SystemInterceptor.java 25% 24.2% 18.8% 22.8%
coverage coverage
 1   
 /**
 2   
  * JFoxSOAF, Service-Oriented Application Framework
 3   
  * 
 4   
  * Copyright (C) www.huihoo.org
 5   
  * 
 6   
  * Distributable under GNU LGPL For more information, please visit:
 7   
  * http://www.huihoo.org/jfox/jfoxsoaf
 8   
  */
 9   
 
 10   
 package org.huihoo.jfox.soaf.schema.config;
 11   
 
 12   
 import java.util.Vector;
 13   
 
 14   
 import org.exolab.castor.xml.Marshaller;
 15   
 import org.exolab.castor.xml.Unmarshaller;
 16   
 
 17   
 /**
 18   
  * Class SystemInterceptor.
 19   
  * 
 20   
  * @version $Revision: 1.1 $ $Date: 2004/10/13 10:52:06 $
 21   
  */
 22   
 public class SystemInterceptor implements java.io.Serializable {
 23   
 
 24   
     /**
 25   
      * Field _interceptorList
 26   
      */
 27   
     private java.util.Vector _interceptorList;
 28   
 
 29  4
     public SystemInterceptor() {
 30  4
         super();
 31  4
         _interceptorList = new Vector();
 32   
     }
 33   
 
 34   
     /**
 35   
      * Method addInterceptor
 36   
      * 
 37   
      * @param vInterceptor
 38   
      */
 39  8
     public void addInterceptor(
 40   
             org.huihoo.jfox.soaf.schema.config.Interceptor vInterceptor)
 41   
             throws java.lang.IndexOutOfBoundsException {
 42  8
         _interceptorList.addElement(vInterceptor);
 43   
     }
 44   
 
 45   
     /**
 46   
      * Method addInterceptor
 47   
      * 
 48   
      * @param index
 49   
      * @param vInterceptor
 50   
      */
 51  0
     public void addInterceptor(int index,
 52   
             org.huihoo.jfox.soaf.schema.config.Interceptor vInterceptor)
 53   
             throws java.lang.IndexOutOfBoundsException {
 54  0
         _interceptorList.insertElementAt(vInterceptor, index);
 55   
     }
 56   
 
 57   
     /**
 58   
      * Method enumerateInterceptor
 59   
      */
 60  0
     public java.util.Enumeration enumerateInterceptor() {
 61  0
         return _interceptorList.elements();
 62   
     }
 63   
 
 64   
     /**
 65   
      * Method getInterceptor
 66   
      * 
 67   
      * @param index
 68   
      */
 69  0
     public org.huihoo.jfox.soaf.schema.config.Interceptor getInterceptor(
 70   
             int index) throws java.lang.IndexOutOfBoundsException {
 71   
         //-- check bounds for index
 72  0
         if ((index < 0) || (index > _interceptorList.size())) {
 73  0
             throw new IndexOutOfBoundsException();
 74   
         }
 75   
 
 76  0
         return (org.huihoo.jfox.soaf.schema.config.Interceptor) _interceptorList
 77   
                 .elementAt(index);
 78   
     }
 79   
 
 80   
     /**
 81   
      * Method getInterceptor
 82   
      */
 83  7
     public org.huihoo.jfox.soaf.schema.config.Interceptor[] getInterceptor() {
 84  7
         int size = _interceptorList.size();
 85  7
         org.huihoo.jfox.soaf.schema.config.Interceptor[] mArray = new org.huihoo.jfox.soaf.schema.config.Interceptor[size];
 86  7
         for (int index = 0; index < size; index++) {
 87  14
             mArray[index] = (org.huihoo.jfox.soaf.schema.config.Interceptor) _interceptorList
 88   
                     .elementAt(index);
 89   
         }
 90  7
         return mArray;
 91   
     }
 92   
 
 93   
     /**
 94   
      * Method getInterceptorCount
 95   
      */
 96  0
     public int getInterceptorCount() {
 97  0
         return _interceptorList.size();
 98   
     }
 99   
 
 100   
     /**
 101   
      * Method isValid
 102   
      */
 103  0
     public boolean isValid() {
 104  0
         try {
 105  0
             validate();
 106   
         } catch (org.exolab.castor.xml.ValidationException vex) {
 107  0
             return false;
 108   
         }
 109  0
         return true;
 110   
     }
 111   
 
 112   
     /**
 113   
      * Method marshal
 114   
      * 
 115   
      * @param out
 116   
      */
 117  0
     public void marshal(java.io.Writer out)
 118   
             throws org.exolab.castor.xml.MarshalException,
 119   
             org.exolab.castor.xml.ValidationException {
 120   
 
 121  0
         Marshaller.marshal(this, out);
 122   
     }
 123   
 
 124   
     /**
 125   
      * Method marshal
 126   
      * 
 127   
      * @param handler
 128   
      */
 129  0
     public void marshal(org.xml.sax.ContentHandler handler)
 130   
             throws java.io.IOException, org.exolab.castor.xml.MarshalException,
 131   
             org.exolab.castor.xml.ValidationException {
 132   
 
 133  0
         Marshaller.marshal(this, handler);
 134   
     }
 135   
 
 136   
     /**
 137   
      * Method removeAllInterceptor
 138   
      */
 139  0
     public void removeAllInterceptor() {
 140  0
         _interceptorList.removeAllElements();
 141   
     }
 142   
 
 143   
     /**
 144   
      * Method removeInterceptor
 145   
      * 
 146   
      * @param index
 147   
      */
 148  0
     public org.huihoo.jfox.soaf.schema.config.Interceptor removeInterceptor(
 149   
             int index) {
 150  0
         java.lang.Object obj = _interceptorList.elementAt(index);
 151  0
         _interceptorList.removeElementAt(index);
 152  0
         return (org.huihoo.jfox.soaf.schema.config.Interceptor) obj;
 153   
     }
 154   
 
 155   
     /**
 156   
      * Method setInterceptor
 157   
      * 
 158   
      * @param index
 159   
      * @param vInterceptor
 160   
      */
 161  0
     public void setInterceptor(int index,
 162   
             org.huihoo.jfox.soaf.schema.config.Interceptor vInterceptor)
 163   
             throws java.lang.IndexOutOfBoundsException {
 164   
         //-- check bounds for index
 165  0
         if ((index < 0) || (index > _interceptorList.size())) {
 166  0
             throw new IndexOutOfBoundsException();
 167   
         }
 168  0
         _interceptorList.setElementAt(vInterceptor, index);
 169   
     }
 170   
 
 171   
     /**
 172   
      * Method setInterceptor
 173   
      * 
 174   
      * @param interceptorArray
 175   
      */
 176  0
     public void setInterceptor(
 177   
             org.huihoo.jfox.soaf.schema.config.Interceptor[] interceptorArray) {
 178   
         //-- copy array
 179  0
         _interceptorList.removeAllElements();
 180  0
         for (int i = 0; i < interceptorArray.length; i++) {
 181  0
             _interceptorList.addElement(interceptorArray[i]);
 182   
         }
 183   
     }
 184   
 
 185   
     /**
 186   
      * Method unmarshal
 187   
      * 
 188   
      * @param reader
 189   
      */
 190  0
     public static org.huihoo.jfox.soaf.schema.config.SystemInterceptor unmarshal(
 191   
             java.io.Reader reader)
 192   
             throws org.exolab.castor.xml.MarshalException,
 193   
             org.exolab.castor.xml.ValidationException {
 194  0
         return (org.huihoo.jfox.soaf.schema.config.SystemInterceptor) Unmarshaller
 195   
                 .unmarshal(
 196   
                         org.huihoo.jfox.soaf.schema.config.SystemInterceptor.class,
 197   
                         reader);
 198   
     }
 199   
 
 200   
     /**
 201   
      * Method validate
 202   
      */
 203  0
     public void validate() throws org.exolab.castor.xml.ValidationException {
 204  0
         org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
 205  0
         validator.validate(this);
 206   
     }
 207   
 
 208   
 }