Clover coverage report - JFox Service-Oriented Application Framework - 1.0-RC2 Coverage timestamp: 星期四 十二月 15 2005 11:58:01 CST FRAMES NO FRAMES |
file stats: | LOC: | 208 |  | 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 |  |
      * @(#)InterceptorDescriptor.java
3 |  |
      *
4 |  |
      * JFoxSOAF, Service-Oriented Application Framework
5 |  |
      *
6 |  |
      * Copyright(c) JFoxSOAF Team
7 |  |
      *
8 |  |
      * Licensed under the GNU LGPL, Version 2.1 (the "License");
9 |  |
      * you may not use this file except in compliance with the License.
10 |  |
      * You may obtain a copy of the License at
11 |  |
      *
12 |  |
      * http://www.gnu.org/copyleft/lesser.html
13 |  |
      *
14 |  |
      * Unless required by applicable law or agreed to in writing, software
15 |  |
      * distributed under the License is distributed on an "AS IS" BASIS,
16 |  |
      * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 |  |
      * See the License for the specific language governing permissions and
18 |  |
      * limitations under the License.
19 |  |
      *
20 |  |
      * For more information, please visit:
21 |  |
      * http://www.jfox.cn/confluence/display/JFoxSOAF/Home
22 |  |
      * http://www.huihoo.org/jfox/jfoxsoaf
23 |  |
      */
24 |  |
25 |  |
     package org.huihoo.jfox.soaf.schema.config;
26 |  |
27 |  |
     import org.exolab.castor.xml.validators.StringValidator;
28 |  |
29 |  |
     /**
30 |  |
      * Class InterceptorDescriptor.
31 |  |
      *
32 |  |
      * @version $Revision: 1.5 $ $Date: 2005/05/22 06:47:43 $
33 |  |
      */
34 |  |
     public class InterceptorDescriptor extends
35 |  |
             org.exolab.castor.xml.util.XMLClassDescriptorImpl {
36 |  |
37 |  |
         /**
38 |  |
          * Field nsPrefix
39 |  |
          */
40 |  |
         private java.lang.String nsPrefix;
41 |  |
42 |  |
         /**
43 |  |
          * Field nsURI
44 |  |
          */
45 |  |
         private java.lang.String nsURI;
46 |  |
47 |  |
         /**
48 |  |
          * Field xmlName
49 |  |
          */
50 |  |
         private java.lang.String xmlName;
51 |  |
52 |  |
         /**
53 |  |
          * Field identity
54 |  |
          */
55 |  |
         private org.exolab.castor.xml.XMLFieldDescriptor identity;
56 |  |
57 | 12 |
         public InterceptorDescriptor() {
58 | 12 |
             super();
59 | 12 |
             xmlName = "interceptor";
60 |  |
61 |  |
             //-- set grouping compositor
62 | 12 |
             setCompositorAsSequence();
63 | 12 |
             org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;
64 | 12 |
             org.exolab.castor.xml.XMLFieldHandler handler = null;
65 | 12 |
             org.exolab.castor.xml.FieldValidator fieldValidator = null;
66 |  |
             //-- initialize attribute descriptors
67 |  |
68 |  |
             //-- initialize element descriptors
69 |  |
70 |  |
             //-- _name
71 | 12 |
             desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
72 |  |
                     java.lang.String.class, "_name", "name",
73 |  |
                     org.exolab.castor.xml.NodeType.Element);
74 | 12 |
             desc.setImmutable(true);
75 | 12 |
             handler = (new org.exolab.castor.xml.XMLFieldHandler() {
76 | 24 |
                 public java.lang.Object getValue(java.lang.Object object)
77 |  |
                         throws IllegalStateException {
78 | 24 |
                     Interceptor target = (Interceptor) object;
79 | 24 |
                     return target.getName();
80 |  |
                 }
81 |  |
82 | 24 |
                 public void setValue(java.lang.Object object, java.lang.Object value)
83 |  |
                         throws IllegalStateException, IllegalArgumentException {
84 | 24 |
                     try {
85 | 24 |
                         Interceptor target = (Interceptor) object;
86 | 24 |
                         target.setName((java.lang.String) value);
87 |  |
                     } catch (java.lang.Exception ex) {
88 | 0 |
                         throw new IllegalStateException(ex.toString());
89 |  |
                     }
90 |  |
                 }
91 |  |
92 | 0 |
                 public java.lang.Object newInstance(java.lang.Object parent) {
93 | 0 |
                     return null;
94 |  |
                 }
95 |  |
             });
96 | 12 |
             desc.setHandler(handler);
97 | 12 |
             desc.setRequired(true);
98 | 12 |
             desc.setMultivalued(false);
99 | 12 |
             addFieldDescriptor(desc);
100 |  |
101 |  |
             //-- validation code for: _name
102 | 12 |
             fieldValidator = new org.exolab.castor.xml.FieldValidator();
103 | 12 |
             fieldValidator.setMinOccurs(1);
104 |  |
             { //-- local scope
105 | 12 |
                 StringValidator typeValidator = new StringValidator();
106 | 12 |
                 typeValidator.setWhiteSpace("preserve");
107 | 12 |
                 fieldValidator.setValidator(typeValidator);
108 |  |
             }
109 | 12 |
             desc.setValidator(fieldValidator);
110 |  |
             //-- _value
111 | 12 |
             desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
112 |  |
                     java.lang.String.class, "_value", "value",
113 |  |
                     org.exolab.castor.xml.NodeType.Element);
114 | 12 |
             desc.setImmutable(true);
115 | 12 |
             handler = (new org.exolab.castor.xml.XMLFieldHandler() {
116 | 24 |
                 public java.lang.Object getValue(java.lang.Object object)
117 |  |
                         throws IllegalStateException {
118 | 24 |
                     Interceptor target = (Interceptor) object;
119 | 24 |
                     return target.getValue();
120 |  |
                 }
121 |  |
122 | 24 |
                 public void setValue(java.lang.Object object, java.lang.Object value)
123 |  |
                         throws IllegalStateException, IllegalArgumentException {
124 | 24 |
                     try {
125 | 24 |
                         Interceptor target = (Interceptor) object;
126 | 24 |
                         target.setValue((java.lang.String) value);
127 |  |
                     } catch (java.lang.Exception ex) {
128 | 0 |
                         throw new IllegalStateException(ex.toString());
129 |  |
                     }
130 |  |
                 }
131 |  |
132 | 0 |
                 public java.lang.Object newInstance(java.lang.Object parent) {
133 | 0 |
                     return null;
134 |  |
                 }
135 |  |
             });
136 | 12 |
             desc.setHandler(handler);
137 | 12 |
             desc.setRequired(true);
138 | 12 |
             desc.setMultivalued(false);
139 | 12 |
             addFieldDescriptor(desc);
140 |  |
141 |  |
             //-- validation code for: _value
142 | 12 |
             fieldValidator = new org.exolab.castor.xml.FieldValidator();
143 | 12 |
             fieldValidator.setMinOccurs(1);
144 |  |
             { //-- local scope
145 | 12 |
                 StringValidator typeValidator = new StringValidator();
146 | 12 |
                 typeValidator.setWhiteSpace("preserve");
147 | 12 |
                 fieldValidator.setValidator(typeValidator);
148 |  |
             }
149 | 12 |
             desc.setValidator(fieldValidator);
150 |  |
         }
151 |  |
152 |  |
         /**
153 |  |
          * Method getAccessMode
154 |  |
          */
155 | 0 |
         public org.exolab.castor.mapping.AccessMode getAccessMode() {
156 | 0 |
             return null;
157 |  |
         }
158 |  |
159 |  |
         /**
160 |  |
          * Method getExtends
161 |  |
          */
162 | 0 |
         public org.exolab.castor.mapping.ClassDescriptor getExtends() {
163 | 0 |
             return null;
164 |  |
         }
165 |  |
166 |  |
         /**
167 |  |
          * Method getIdentity
168 |  |
          */
169 | 48 |
         public org.exolab.castor.mapping.FieldDescriptor getIdentity() {
170 | 48 |
             return identity;
171 |  |
         }
172 |  |
173 |  |
         /**
174 |  |
          * Method getJavaClass
175 |  |
          */
176 | 48 |
         public java.lang.Class getJavaClass() {
177 | 48 |
             return org.huihoo.jfox.soaf.schema.config.Interceptor.class;
178 |  |
         }
179 |  |
180 |  |
         /**
181 |  |
          * Method getNameSpacePrefix
182 |  |
          */
183 | 0 |
         public java.lang.String getNameSpacePrefix() {
184 | 0 |
             return nsPrefix;
185 |  |
         }
186 |  |
187 |  |
         /**
188 |  |
          * Method getNameSpaceURI
189 |  |
          */
190 | 0 |
         public java.lang.String getNameSpaceURI() {
191 | 0 |
             return nsURI;
192 |  |
         }
193 |  |
194 |  |
         /**
195 |  |
          * Method getValidator
196 |  |
          */
197 | 24 |
         public org.exolab.castor.xml.TypeValidator getValidator() {
198 | 24 |
             return this;
199 |  |
         }
200 |  |
201 |  |
         /**
202 |  |
          * Method getXMLName
203 |  |
          */
204 | 0 |
         public java.lang.String getXMLName() {
205 | 0 |
             return xmlName;
206 |  |
         }
207 |  |
208 |  |
     }