KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > ccm > IDL3 > DeclarationKind


1 /*====================================================================
2
3 OpenCCM: The Open CORBA Component Model Platform
4 Copyright (C) 2000-2002 USTL - LIFL - GOAL
5 Contact: openccm-team@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): ______________________________________.
24
25 ====================================================================*/

26
27 package org.objectweb.ccm.IDL3;
28
29 /**
30  * This class defines kinds of Declaration objects.
31  *
32  * @author <a=href="Philippe.Merle@lifl.fr">Philippe Merle</a>
33  * <a=href="Mathieu.Vadet@lifl.fr">Mathieu Vadet</a>
34  *
35  * @version 0.3
36  */

37
38 public class DeclarationKind
39 {
40     // ==================================================================
41
//
42
// Public constant fields.
43
//
44
// ==================================================================
45

46     /**
47      ** Int constant for null Declaration object kind.
48      **/

49     public static final int _dk_null = 1<<0;
50
51     /**
52      ** Int constant for all object kinds.
53      **/

54     public static final int _dk_all = (1<<0)|(1<<1)|(1<<2)|(1<<3)|(1<<4)|(1<<5)|(1<<6)|
55                                       (1<<7)|(1<<8)|(1<<9)|(1<<10)|(1<<11)|(1<<12)|(1<<13)|
56                                       (1<<14)|(1<<15)|(1<<16)|(1<<17)|(1<<18)|(1<<19)|(1<<20)|
57                                       (1<<21)|(1<<22)|(1<<23)|(1<<24)|(1<<25)|(1<<26);
58
59     /**
60      ** Int constant for ModuleDecl object kind.
61      **/

62     public static final int _dk_module = 1<<1;
63
64     /**
65      ** Int constant for AbstractInterfaceDecl object kind.
66      **/

67     public static final int _dk_abstract_interface = 1<<2;
68
69     /**
70      ** Int constant for LocalInterfaceDecl object kind.
71      **/

72     public static final int _dk_local_interface = 1<<3;
73
74     /**
75      ** Int constant for InterfaceDecl object kind.
76      **/

77     public static final int _dk_interface = 1<<4;
78
79     /**
80      ** Int constant for AliasDecl object kind.
81      **/

82     public static final int _dk_alias = 1<<5;
83
84     /**
85      ** Int constant for AttributeDecl object kind.
86      **/

87     public static final int _dk_attribute = 1<<6;
88
89     /**
90      ** Int constant for ConstantDecl object kind.
91      **/

92     public static final int _dk_constant = 1<<7;
93
94     /**
95      ** Int constant for EnumDecl object kind.
96      **/

97     public static final int _dk_enum = 1<<8;
98
99     /**
100      ** Int constant for ExceptionDecl object kind.
101      **/

102     public static final int _dk_exception = 1<<9;
103
104     /**
105      ** Int constant for NativeDecl object kind.
106      **/

107     public static final int _dk_native = 1<<10;
108
109     /**
110      ** Int constant for OperationDecl object kind.
111      **/

112     public static final int _dk_operation = 1<<11;
113
114     /**
115      ** Int constant for StructDecl object kind.
116      **/

117     public static final int _dk_struct = 1<<12;
118
119     /**
120      ** Int constant for UnionDecl object kind.
121      **/

122     public static final int _dk_union = 1<<13;
123
124     /**
125      ** Int constant for ValueBoxDecl object kind.
126      **/

127     public static final int _dk_value_box = 1<<14;
128
129     /**
130      ** Int constant for ValueDecl object kind.
131      **/

132     public static final int _dk_value = 1<<15;
133
134     /**
135      ** Int constant for ValueMemberDecl object kind.
136      **/

137     public static final int _dk_value_member = 1<<16;
138
139     /**
140      ** Int constant for ComponentDecl object kind.
141      **/

142     public static final int _dk_component = 1<<17;
143
144     /**
145      ** Int constant for ConsumesDecl object kind.
146      **/

147     public static final int _dk_consumes = 1<<18;
148
149     /**
150      ** Int constant for EmitsDecl object kind.
151      **/

152     public static final int _dk_emits = 1<<19;
153
154     /**
155      ** Int constant for PublishesDecl object kind.
156      **/

157     public static final int _dk_publishes = 1<<20;
158
159     /**
160      ** Int constant for ProvidesDecl object kind.
161      **/

162     public static final int _dk_provides = 1<<21;
163
164     /**
165      ** Int constant for UsesDecl object kind.
166      **/

167     public static final int _dk_uses = 1<<22;
168
169     /**
170      ** Int constant for HomeDecl object kind.
171      **/

172     public static final int _dk_home = 1<<23;
173
174     /**
175      ** Int constant for FactoryDecl object kind.
176      **/

177     public static final int _dk_factory = 1<<24;
178
179     /**
180      ** Int constant for FinderDecl object kind.
181      **/

182     public static final int _dk_finder = 1<<25;
183
184     /**
185      ** Int constant for EventDecl object kind.
186      **/

187     public static final int _dk_event = 1<<26;
188
189     /**
190      ** Int constant for Repository object kind.
191      **/

192     public static final int _dk_repository = 1<<27;
193
194
195     // ==================================================================
196
//
197
// Public methods.
198
//
199
// ==================================================================
200

201     /**
202      **
203      **/

204     public static String JavaDoc
205     toString(int kind)
206     {
207         switch(kind)
208         {
209         case _dk_null :
210             return "null";
211         case _dk_module :
212             return "module";
213         case _dk_abstract_interface :
214             return "abstract_interface";
215         case _dk_local_interface :
216             return "local_interface";
217         case _dk_interface :
218             return "interface";
219         case _dk_alias :
220             return "alias";
221         case _dk_attribute :
222             return "attribute";
223         case _dk_constant :
224             return "constant";
225         case _dk_enum :
226             return "enum";
227         case _dk_exception :
228             return "exception";
229         case _dk_native :
230             return "native";
231         case _dk_operation :
232             return "operation";
233         case _dk_struct :
234             return "struct";
235         case _dk_union :
236             return "union";
237         case _dk_value_box :
238             return "value_box";
239         case _dk_value :
240             return "value";
241         case _dk_value_member :
242             return "value_member";
243         case _dk_component :
244             return "component";
245         case _dk_consumes :
246             return "consumes";
247         case _dk_emits :
248             return "emits";
249         case _dk_publishes :
250             return "publishes";
251         case _dk_provides :
252             return "provides";
253         case _dk_uses :
254             return "uses";
255         case _dk_home :
256             return "home";
257         case _dk_factory :
258             return "factory";
259         case _dk_finder :
260             return "finder";
261         case _dk_event :
262             return "event";
263         case _dk_repository :
264             return "repository";
265         default :
266             return "null";
267         }
268     }
269 }
270
Popular Tags