KickJava   Java API By Example, From Geeks To Geeks.

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


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 /** Used to access AST DeclarationKind. */
30 import org.objectweb.openccm.ast.api.DeclarationKind;
31
32 /**
33  * PsdlOperationDeclImpl is a wrapper class for PSDL operation declarations.
34  *
35  *
36  * Inherits from:
37  *
38  * - OperationBaseImpl as PSDL operations are like IDL operations.
39  *
40  * - PsdlOperationDecl: OMG IDL for PSDL operation declarations.
41  *
42  *
43  * Provides:
44  *
45  * - The 'Const' property,
46  * i.e. the setConst and isConst operations.
47  *
48  *
49  * @author <a HREF="mailto:Philippe.Merle@lifl.fr">Philippe Merle</a>
50  * <a HREF="mailto:Christophe.Demarey@lifl.fr">Christophe Demarey</a>
51  *
52  * @version 0.1
53  */

54
55 public class PsdlOperationDeclImpl
56      extends OperationBaseImpl
57   implements org.objectweb.openccm.ast.api.PsdlOperationDecl
58 {
59     // ==================================================================
60
//
61
// Internal state.
62
//
63
// ==================================================================
64

65     /** The 'Const' property. */
66     private boolean const_;
67
68     // ==================================================================
69
//
70
// Constructor.
71
//
72
// ==================================================================
73

74     /**
75      * The constructor.
76      *
77      * @param rep The repository of the declaration.
78      * @param parent The parent scope of the value member declaration.
79      **/

80     protected
81     PsdlOperationDeclImpl(Repository rep,
82                           ScopeImpl parent)
83     {
84         // Call the OperationBaseImpl constructor.
85
super(rep, parent);
86
87         // Init internal state.
88
const_ = false;
89     }
90
91     // ==================================================================
92
//
93
// Internal methods.
94
//
95
// ==================================================================
96

97     // ==================================================================
98
//
99
// Internal methods for DeclarationImpl.
100
//
101
// ==================================================================
102

103     /**
104      * Obtain its CORBA 3.0 Contained reference.
105      *
106      * @return The Contained object associated with the declaration.
107      */

108     protected org.omg.CORBA.Contained JavaDoc
109     getContained()
110     {
111         // TODO
112
return null;
113     }
114
115     /**
116       * Obtain its category (IDL, PSDL, CIDL).
117       *
118       * @return The category of the declaration.
119       */

120     public org.objectweb.openccm.ast.api.DeclarationCategory
121     getCategory()
122     {
123         return org.objectweb.openccm.ast.api.DeclarationCategory.dc_psdl;
124     }
125
126     // ==================================================================
127
//
128
// Public methods.
129
//
130
// ==================================================================
131

132     // ==================================================================
133
//
134
// Methods for OMG IDL org.objectweb.openccm.ast.api.WithDependencies
135
//
136
// ==================================================================
137

138     // ==================================================================
139
//
140
// Methods for OMG IDL org.objectweb.openccm.ast.api.Declaration
141
//
142
// ==================================================================
143

144     /**
145      * Obtain its DeclarationKind.
146      *
147      * @return The DeclarationKind of the object.
148      */

149     public long
150     getDeclKind()
151     {
152         return DeclarationKind.dk_psdl_operation;
153     }
154
155     // ==================================================================
156
//
157
// Methods for OMG IDL org.objectweb.openccm.ast.api.OperationBase
158
//
159
// ==================================================================
160

161     // ==================================================================
162
//
163
// Methods for OMG IDL org.objectweb.openccm.ast.api.PsdlOperationDecl
164
//
165
// ==================================================================
166

167     /**
168      * Set as a const state operation.
169      *
170      * @param b True if const, or false otherwise.
171      */

172     public void
173     setConst(boolean b)
174     {
175         const_ = b;
176     }
177
178     /**
179      * Is it a const state operation?
180      *
181      * @return True if it is const state operation, else false.
182      */

183     public boolean
184     isConst()
185     {
186         return const_;
187     }
188 }
189
Popular Tags