KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > openccm > ast > lib > StorageTypeStateMemberDeclImpl


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): Philippe Merle, Christophe Demarey.
23 Contributor(s): ______________________________________.
24
25 ====================================================================*/

26
27 package org.objectweb.openccm.ast.lib;
28
29 /** To access AST DeclarationKind. */
30 import org.objectweb.openccm.ast.api.DeclarationKind;
31
32 /** To access AST Declaration. */
33 import org.objectweb.openccm.ast.api.Declaration;
34
35 /**
36  * StorageTypeStateMemberDeclImpl is a wrapper class for
37  * PSDL storagetype state member declarations.
38  *
39  *
40  * Inherits from:
41  *
42  * - DeclarationWithTypeRefImpl as state members are IDL declarations
43  * and have an associated type.
44  *
45  * - StorageTypeStateMemberDecl: OMG IDL for PSDL storagetype state
46  * member declarations.
47  *
48  *
49  * Provides:
50  *
51  * - The 'Readonly' property,
52  * i.e. the setReadonly and isReadonly operations.
53  *
54  *
55  * @author <a HREF="mailto:Philippe.Merle@lifl.fr">Philippe Merle</a>
56  * <a HREF="mailto:Christophe.Demarey@lifl.fr">Christophe Demarey</a>
57  *
58  * @version 0.1
59  */

60
61 public class StorageTypeStateMemberDeclImpl
62      extends DeclarationWithPsdlTypeRefImpl
63   implements org.objectweb.openccm.ast.api.StorageTypeStateMemberDecl
64 {
65     // ==================================================================
66
//
67
// Internal state.
68
//
69
// ==================================================================
70

71     /** The Readonly property. */
72     private boolean readonly_;
73
74     // ==================================================================
75
//
76
// Constructor.
77
//
78
// ==================================================================
79

80     /**
81      * The constructor with the parent scope.
82      *
83      * @param rep The repository of the declaration.
84      * @param parent The parent scope of the value member declaration.
85      **/

86     protected
87     StorageTypeStateMemberDeclImpl(Repository rep,
88                                    ScopeImpl parent)
89     {
90         // Call the DeclarationWithTypeRefImpl constructor.
91
super(rep, parent);
92
93         // Init internal state.
94
readonly_ = false;
95     }
96
97     // ==================================================================
98
//
99
// Internal methods.
100
//
101
// ==================================================================
102

103     // ==================================================================
104
//
105
// Internal methods for DeclarationImpl.
106
//
107
// ==================================================================
108

109     /**
110      * Obtain its CORBA 3.0 Contained reference.
111      *
112      * @return The Contained object associated with the value
113      * member declaration.
114      */

115     protected org.omg.CORBA.Contained JavaDoc
116     getContained()
117     {
118         // TODO
119
return null;
120     }
121
122     /**
123       * Obtain its category (IDL, PSDL, CIDL).
124       *
125       * @return The category of the declaration.
126       */

127     public org.objectweb.openccm.ast.api.DeclarationCategory
128     getCategory()
129     {
130         return org.objectweb.openccm.ast.api.DeclarationCategory.dc_psdl;
131     }
132
133     // ==================================================================
134
//
135
// Internal methods for DeclarationWithTypeRefImpl.
136
//
137
// ==================================================================
138

139     // ==================================================================
140
//
141
// Public methods.
142
//
143
// ==================================================================
144

145     // ==================================================================
146
//
147
// Methods for OMG IDL org.objectweb.openccm.ast.api.WithDependencies
148
//
149
// ==================================================================
150

151     /**
152      * Obtain the declaration external dependencies.
153      *
154      * Note: for scopes, contained objects are not considered
155      * as dependencies.
156      *
157      * @return The list of dependencies as an array of Declaration.
158      */

159     public Declaration[]
160     getDependencies()
161     {
162         // TODO
163
return null;
164     }
165
166     // ==================================================================
167
//
168
// Methods for OMG IDL org.objectweb.openccm.ast.api.Declaration
169
//
170
// ==================================================================
171

172     /**
173      * Obtain its DeclarationKind.
174      *
175      * @return The DeclarationKind of the object.
176      */

177     public long
178     getDeclKind()
179     {
180         return DeclarationKind.dk_storage_type_state_member;
181     }
182
183     /**
184      * Create the value member declaration into the IFR.
185      */

186     public void
187     create()
188     {
189         // TODO
190
super.create();
191     }
192
193     // ==================================================================
194
//
195
// Methods for org.objectweb.openccm.ast.api.DeclarationWithTypeRef
196
//
197
// ==================================================================
198

199     // ==================================================================
200
//
201
// Methods for OMG IDL org.objectweb.openccm.ast.api.StorageTypeStateMemberDecl
202
//
203
// ==================================================================
204

205     /**
206      * Set as a readonly state member.
207      *
208      * @param b True if readonly, or false otherwise.
209      */

210     public void
211     setReadonly(boolean b)
212     {
213         readonly_ = b;
214     }
215
216     /**
217      * Is it a readonly state member?
218      *
219      * @return True if it is readonly state member, else false.
220      */

221     public boolean
222     isReadonly()
223     {
224         return readonly_;
225     }
226 }
227
Popular Tags