KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > openccm > generator > java > ast > lib > AttributeObjectImpl


1 /*====================================================================
2
3 OpenCCM: The Open CORBA Component Model Platform
4 Copyright (C) 2000-2004 INRIA & USTL - LIFL - GOAL
5 Contact: openccm@objectweb.org
6
7 This library is free software; you can redistribute it and/or
8 modify it under the terms of the GNU Lesser General Public
9 License as published by the Free Software Foundation; either
10 version 2.1 of the License, or any later version.
11
12 This library is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 Lesser General Public License for more details.
16
17 You should have received a copy of the GNU Lesser General Public
18 License along with this library; if not, write to the Free Software
19 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
20 USA
21
22 Initial developer(s): Christophe Demarey.
23 Contributor(s): ________________________________________.
24
25 ====================================================================*/

26
27 package org.objectweb.openccm.generator.java.ast.lib;
28
29 import org.objectweb.openccm.generator.java.ast.api.StaticObject;
30 import org.objectweb.openccm.generator.java.ast.api.AttributeObject;
31
32 /**
33  * This is the representation for java Attributes.
34  *
35  * @author <a HREF="mailto:Christophe.Demarey@lifl.fr">Christophe Demarey</A>
36  */

37
38 public class AttributeObjectImpl
39      extends ObjectBaseImpl
40   implements AttributeObject
41 {
42     // ==================================================================
43
//
44
// Internal state.
45
//
46
// ==================================================================
47

48     /** The delegation for a static */
49     private StaticObject static_delegate_;
50
51     /** The Attribute type */
52     private String JavaDoc type_;
53
54     /** The Attribute initial value */
55     private String JavaDoc initial_value_;
56
57     // ==================================================================
58
//
59
// Constructor.
60
//
61
// ==================================================================
62

63     /** The default constructor. */
64     public
65     AttributeObjectImpl()
66     {
67         // Init internal states
68
super();
69         static_delegate_ = new StaticObjectImpl();
70     }
71
72     // ==================================================================
73
//
74
// Internal methods.
75
//
76
// ==================================================================
77

78     // ==================================================================
79
//
80
// Public methods.
81
//
82
// ==================================================================
83

84     // ==================================================================
85
//
86
// Methods for org.objectweb.openccm.generator.java.ast.api.StaticObject
87
//
88
// ==================================================================
89

90     /**
91      * Set static this object.
92      *
93      * @param b - The value to set.
94      */

95     public void
96     setStatic(boolean b)
97     {
98         static_delegate_.setStatic(b);
99     }
100
101     /**
102      * Is this object static ?
103      *
104      * @return True if it is static, else false.
105      */

106     public boolean
107     isStatic()
108     {
109         return static_delegate_.isStatic();
110     }
111
112     // ==================================================================
113
//
114
// Methods for org.objectweb.openccm.generator.java.ast.api.AttributeObject
115
//
116
// ==================================================================
117

118     /**
119      * Set its type.
120      *
121      * @param type - The type to set.
122      */

123     public void
124     setType(String JavaDoc type)
125     {
126         type_ = type;
127     }
128
129     /**
130      * Obtain its type.
131      *
132      * @return Its type.
133      */

134     public String JavaDoc
135     getType()
136     {
137         return type_;
138     }
139
140     /**
141      * Set its initial value.
142      *
143      * @param value - The value to set.
144      */

145     public void
146     setInitialValue(String JavaDoc value)
147     {
148         initial_value_ = value;
149     }
150
151     /**
152      * Obtain its initial value.
153      *
154      * @return Its initial value.
155      */

156     public String JavaDoc
157     getInitialValue()
158     {
159         return initial_value_;
160     }
161 }
162
Popular Tags