KickJava   Java API By Example, From Geeks To Geeks.

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


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, Mathieu Vadet.
23 Contributor(s): Christophe Demarey.
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 /** To use CORBA::ComponentIR::FinderDef. */
33 import org.omg.CORBA.ComponentIR.FinderDef;
34 import org.omg.CORBA.ComponentIR.FinderDefHelper;
35
36 /**
37  * FinderDeclImpl is a wrapper class for
38  * IDL home finder operation declarations.
39  *
40  *
41  * Inherits from:
42  *
43  * - HomeOperationBaseImpl as these are IDL home operations.
44  *
45  * - FinderDecl: OMG IDL for home finder operation declarations.
46  *
47  *
48  * @author <a HREF="mailto:Philippe.Merle@lifl.fr">Philippe Merle</a>
49  * <a HREF="mailto:Mathieu.Vadet@lifl.fr">Mathieu Vadet</a>
50  *
51  * @version 0.3
52  */

53
54 public class FinderDeclImpl
55        extends HomeOperationBaseImpl
56        implements org.objectweb.openccm.ast.api.FinderDecl
57 {
58     // ==================================================================
59
//
60
// Internal state.
61
//
62
// ==================================================================
63

64     /** Reference to the CORBA 3.0 FinderDef. */
65     private FinderDef finder_def_;
66
67     // ==================================================================
68
//
69
// Constructor.
70
//
71
// ==================================================================
72

73     /**
74      * The constructor with the parent scope.
75      *
76      * @param rep The repository of the declaration.
77      * @param parent The parent scope of the finder declaration.
78      */

79     protected
80     FinderDeclImpl(Repository rep, ScopeImpl parent)
81     {
82         // Call the HomeOperationBaseImpl constructor.
83
super(rep, parent);
84
85         // Init internal state.
86
finder_def_ = null;
87     }
88
89     // ==================================================================
90
//
91
// Internal methods.
92
//
93
// ==================================================================
94

95     // ==================================================================
96
//
97
// Internal methods for DeclarationImpl.
98
//
99
// ==================================================================
100

101     /**
102      * Loads infos of the CORBA 3.0 FinderDef.
103      *
104      * @param contained The FinderDef to load.
105      */

106     protected void
107     load(org.omg.CORBA.Contained JavaDoc contained)
108     {
109         finder_def_ = FinderDefHelper.narrow(contained);
110         super.load(contained);
111     }
112
113     /**
114      * Obtain its CORBA 3.0 Contained reference.
115      *
116      * @return The Contained object associated with the finder declaration.
117      */

118     protected org.omg.CORBA.Contained JavaDoc
119     getContained()
120     {
121        return finder_def_;
122     }
123
124     // ==================================================================
125
//
126
// Public methods.
127
//
128
// ==================================================================
129

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

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

142     /**
143      * Create the finder declaration into the IFR.
144      */

145     public void
146     create()
147     {
148         finder_def_ = the_parent_.getHomeDef().
149                       create_finder(getId(), getName(), getVersion(),
150                                     parameters_.getParameterDescriptionSeq(),
151                                     exceptions_.getExceptionDefSeq());
152     }
153
154     /**
155      * Obtain its DeclarationKind.
156      *
157      * @return The DeclarationKind of the object.
158      */

159     public long
160     getDeclKind()
161     {
162         return DeclarationKind.dk_finder;
163     }
164
165     // ==================================================================
166
//
167
// Methods for OMG IDL org.objectweb.openccm.ast.api.OperationDecl
168
//
169
// ==================================================================
170

171     // ==================================================================
172
//
173
// Methods for OMG IDL org.objectweb.openccm.ast.api.ClientOperationMapping
174
//
175
// ==================================================================
176

177     // ==================================================================
178
//
179
// Methods for OMG IDL org.objectweb.openccm.ast.api.LocalOperationMapping
180
//
181
// ==================================================================
182

183     // ==================================================================
184
//
185
// Methods for OMG IDL org.objectweb.openccm.ast.api.HomeOperationBase
186
//
187
// ==================================================================
188

189     // ==================================================================
190
//
191
// Methods for OMG IDL org.objectweb.openccm.ast.api.FinderDecl
192
//
193
// ==================================================================
194

195 }
196
Popular Tags