Clover coverage report - JFox Service-Oriented Application Framework - 1.0-M2
Coverage timestamp: 星期四 十一月 25 2004 17:14:11 PST
file stats: LOC: 194   Methods: 15
NCLOC: 110   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
ConfigurationEntryDescriptor.java - 83.3% 53.3% 76.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 org.exolab.castor.xml.validators.StringValidator;
 13   
 
 14   
 /**
 15   
  * Class ConfigurationEntryDescriptor.
 16   
  * 
 17   
  * @version $Revision: 1.3 $ $Date: 2004/10/13 10:50:55 $
 18   
  */
 19   
 
 20   
 public class ConfigurationEntryDescriptor extends
 21   
         org.exolab.castor.xml.util.XMLClassDescriptorImpl {
 22   
 
 23   
     /**
 24   
      * Field nsPrefix
 25   
      */
 26   
     private java.lang.String nsPrefix;
 27   
 
 28   
     /**
 29   
      * Field nsURI
 30   
      */
 31   
     private java.lang.String nsURI;
 32   
 
 33   
     /**
 34   
      * Field xmlName
 35   
      */
 36   
     private java.lang.String xmlName;
 37   
 
 38   
     /**
 39   
      * Field identity
 40   
      */
 41   
     private org.exolab.castor.xml.XMLFieldDescriptor identity;
 42   
 
 43  4
     public ConfigurationEntryDescriptor() {
 44  4
         super();
 45  4
         xmlName = "configuration-entry";
 46   
 
 47   
         //-- set grouping compositor
 48  4
         setCompositorAsSequence();
 49  4
         org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;
 50  4
         org.exolab.castor.xml.XMLFieldHandler handler = null;
 51  4
         org.exolab.castor.xml.FieldValidator fieldValidator = null;
 52   
         //-- initialize attribute descriptors
 53   
 
 54   
         //-- initialize element descriptors
 55   
 
 56   
         //-- _name
 57  4
         desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
 58   
                 java.lang.String.class, "_name", "name",
 59   
                 org.exolab.castor.xml.NodeType.Element);
 60  4
         desc.setImmutable(true);
 61  4
         handler = (new org.exolab.castor.xml.XMLFieldHandler() {
 62  16
             public java.lang.Object getValue(java.lang.Object object)
 63   
                     throws IllegalStateException {
 64  16
                 ConfigurationEntry target = (ConfigurationEntry) object;
 65  16
                 return target.getName();
 66   
             }
 67   
 
 68  16
             public void setValue(java.lang.Object object, java.lang.Object value)
 69   
                     throws IllegalStateException, IllegalArgumentException {
 70  16
                 try {
 71  16
                     ConfigurationEntry target = (ConfigurationEntry) object;
 72  16
                     target.setName((java.lang.String) value);
 73   
                 } catch (java.lang.Exception ex) {
 74  0
                     throw new IllegalStateException(ex.toString());
 75   
                 }
 76   
             }
 77   
 
 78  0
             public java.lang.Object newInstance(java.lang.Object parent) {
 79  0
                 return null;
 80   
             }
 81   
         });
 82  4
         desc.setHandler(handler);
 83  4
         desc.setRequired(true);
 84  4
         desc.setMultivalued(false);
 85  4
         addFieldDescriptor(desc);
 86   
 
 87   
         //-- validation code for: _name
 88  4
         fieldValidator = new org.exolab.castor.xml.FieldValidator();
 89  4
         fieldValidator.setMinOccurs(1);
 90   
         { //-- local scope
 91  4
             StringValidator typeValidator = new StringValidator();
 92  4
             typeValidator.setWhiteSpace("preserve");
 93  4
             fieldValidator.setValidator(typeValidator);
 94   
         }
 95  4
         desc.setValidator(fieldValidator);
 96   
         //-- _value
 97  4
         desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
 98   
                 java.lang.String.class, "_value", "value",
 99   
                 org.exolab.castor.xml.NodeType.Element);
 100  4
         desc.setImmutable(true);
 101  4
         handler = (new org.exolab.castor.xml.XMLFieldHandler() {
 102  16
             public java.lang.Object getValue(java.lang.Object object)
 103   
                     throws IllegalStateException {
 104  16
                 ConfigurationEntry target = (ConfigurationEntry) object;
 105  16
                 return target.getValue();
 106   
             }
 107   
 
 108  16
             public void setValue(java.lang.Object object, java.lang.Object value)
 109   
                     throws IllegalStateException, IllegalArgumentException {
 110  16
                 try {
 111  16
                     ConfigurationEntry target = (ConfigurationEntry) object;
 112  16
                     target.setValue((java.lang.String) value);
 113   
                 } catch (java.lang.Exception ex) {
 114  0
                     throw new IllegalStateException(ex.toString());
 115   
                 }
 116   
             }
 117   
 
 118  0
             public java.lang.Object newInstance(java.lang.Object parent) {
 119  0
                 return null;
 120   
             }
 121   
         });
 122  4
         desc.setHandler(handler);
 123  4
         desc.setRequired(true);
 124  4
         desc.setMultivalued(false);
 125  4
         addFieldDescriptor(desc);
 126   
 
 127   
         //-- validation code for: _value
 128  4
         fieldValidator = new org.exolab.castor.xml.FieldValidator();
 129  4
         fieldValidator.setMinOccurs(1);
 130   
         { //-- local scope
 131  4
             StringValidator typeValidator = new StringValidator();
 132  4
             typeValidator.setWhiteSpace("preserve");
 133  4
             fieldValidator.setValidator(typeValidator);
 134   
         }
 135  4
         desc.setValidator(fieldValidator);
 136   
     }
 137   
 
 138   
     /**
 139   
      * Method getAccessMode
 140   
      */
 141  0
     public org.exolab.castor.mapping.AccessMode getAccessMode() {
 142  0
         return null;
 143   
     }
 144   
 
 145   
     /**
 146   
      * Method getExtends
 147   
      */
 148  0
     public org.exolab.castor.mapping.ClassDescriptor getExtends() {
 149  0
         return null;
 150   
     }
 151   
 
 152   
     /**
 153   
      * Method getIdentity
 154   
      */
 155  32
     public org.exolab.castor.mapping.FieldDescriptor getIdentity() {
 156  32
         return identity;
 157   
     }
 158   
 
 159   
     /**
 160   
      * Method getJavaClass
 161   
      */
 162  32
     public java.lang.Class getJavaClass() {
 163  32
         return org.huihoo.jfox.soaf.schema.config.ConfigurationEntry.class;
 164   
     }
 165   
 
 166   
     /**
 167   
      * Method getNameSpacePrefix
 168   
      */
 169  0
     public java.lang.String getNameSpacePrefix() {
 170  0
         return nsPrefix;
 171   
     }
 172   
 
 173   
     /**
 174   
      * Method getNameSpaceURI
 175   
      */
 176  0
     public java.lang.String getNameSpaceURI() {
 177  0
         return nsURI;
 178   
     }
 179   
 
 180   
     /**
 181   
      * Method getValidator
 182   
      */
 183  16
     public org.exolab.castor.xml.TypeValidator getValidator() {
 184  16
         return this;
 185   
     }
 186   
 
 187   
     /**
 188   
      * Method getXMLName
 189   
      */
 190  0
     public java.lang.String getXMLName() {
 191  0
         return xmlName;
 192   
     }
 193   
 
 194   
 }