Clover coverage report - JFox Service-Oriented Application Framework - 1.0-M2 Coverage timestamp: 星期四 十一月 25 2004 17:14:11 PST FRAMES NO FRAMES |
file stats: | LOC: | 193 |  | 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
InterceptorDescriptor.java | - | 83.3% | 53.3% | 76.8% |

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