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: | 198 |  | 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
ParameterDescriptor.java | - | 0% | 0% | 0% |

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