KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > ws > jaxme > xs > jaxb > impl > JAXBTypesafeEnumMemberImpl


1 /*
2  * Copyright 2003, 2004 The Apache Software Foundation
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15
16  */

17 package org.apache.ws.jaxme.xs.jaxb.impl;
18
19 import org.apache.ws.jaxme.xs.jaxb.JAXBJavadoc;
20 import org.apache.ws.jaxme.xs.jaxb.JAXBTypesafeEnumMember;
21 import org.apache.ws.jaxme.xs.xml.XsObject;
22
23
24 /**
25  * @author <a HREF="mailto:joe@ispsoft.de">Jochen Wiedmann</a>
26  */

27 public class JAXBTypesafeEnumMemberImpl extends JAXBXsObjectImpl
28     implements JAXBTypesafeEnumMember {
29   /** <p>Creates a new instance of JAXBTypesafeEnumClassImpl.java.</p>
30    */

31   protected JAXBTypesafeEnumMemberImpl(XsObject pParent) {
32     super(pParent);
33   }
34
35   private String JavaDoc name, value;
36   private JAXBJavadoc javadoc;
37
38   public void setName(String JavaDoc pName) {
39     name = pName;
40   }
41
42   public String JavaDoc getName() {
43     return name;
44   }
45
46   public void setValue(String JavaDoc pValue) {
47     value = pValue;
48   }
49
50   public String JavaDoc getValue() {
51     return value;
52   }
53
54   public JAXBJavadoc createJavadoc() {
55     if (javadoc != null) {
56       throw new IllegalStateException JavaDoc("Multiple javadoc elements are not supported.");
57     }
58     javadoc = getJAXBXsObjectFactory().newJAXBJavadoc(this);
59     return javadoc;
60   }
61
62   public JAXBJavadoc getJavadoc() {
63     return javadoc;
64   }
65 }
Popular Tags