KickJava   Java API By Example, From Geeks To Geeks.

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


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.ast.lib;
28
29 /** To access AST PsdlTypeRef. */
30 import org.objectweb.openccm.ast.api.PsdlTypeRef;
31
32 /**
33  * DeclarationWithPsdlTypeRefImpl is a wrapper class for
34  * Declaration with an associated psdl type.
35  *
36  *
37  * Inherits from:
38  *
39  * - DeclarationImpl as they are IDL declarations,
40  *
41  * - DeclarationWithPsdlTypeRef: OMG IDL for Declaration with an associated psdl type.
42  *
43  *
44  * @author <a HREF="mailto:Christophe.Demarey@lifl.fr">Christophe Demarey</a>
45  *
46  * @version 0.1
47  */

48
49 abstract public
50           class DeclarationWithPsdlTypeRefImpl
51         extends DeclarationImpl
52      implements org.objectweb.openccm.ast.api.DeclarationWithPsdlTypeRef
53 {
54     // ==================================================================
55
//
56
// Internal state.
57
//
58
// ==================================================================
59

60     /** The associated PsdlTypeRef. */
61     protected PsdlTypeRef type_;
62
63     // ==================================================================
64
//
65
// Constructor.
66
//
67
// ==================================================================
68

69     /**
70      * The constructor with the parent scope.
71      *
72      * @param rep The repository of the declaration.
73      * @param parent The parent scope of the declaration.
74      */

75     protected
76     DeclarationWithPsdlTypeRefImpl(Repository rep,
77                                ScopeImpl parent)
78     {
79         // Call the DeclarationImpl constructor.
80
super(rep, parent);
81
82         // Init internal state.
83
type_ = null;
84     }
85
86     // ==================================================================
87
//
88
// Internal methods.
89
//
90
// ==================================================================
91

92     // ==================================================================
93
//
94
// Internal methods for DeclarationWithTypeRefImpl.
95
//
96
// ==================================================================
97

98     // ==================================================================
99
//
100
// Public methods.
101
//
102
// ==================================================================
103

104     // ==================================================================
105
//
106
// Methods for OMG IDL org.objectweb.openccm.ast.api.Declaration
107
//
108
// ==================================================================
109

110     // ==================================================================
111
//
112
// Methods for org.objectweb.openccm.ast.api.DeclarationWithPsdlTypeRef
113
//
114
// ==================================================================
115

116     /**
117      * Set the associated TypeRef reference.
118      *
119      * @param type The associated TypeRef reference.
120      */

121     public void
122     setType(PsdlTypeRef type)
123     {
124        type_ = type;
125     }
126
127     /**
128      * Obtain the associated TypeRef reference.
129      *
130      * @return The associated TypeRef reference.
131      */

132     public PsdlTypeRef
133     getType()
134     {
135         return type_;
136     }
137 }
138
Popular Tags