KickJava   Java API By Example, From Geeks To Geeks.

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


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 represents the CORBA::TypeCode object in the IDL3 layer.
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 TypeKind
39 {
40     // ==================================================================
41
//
42
// Public constant fields.
43
//
44
// ==================================================================
45

46     /**
47      ** Int constant for null CORBA::TypeCode kind.
48      **/

49     public static final int _tk_null = org.omg.CORBA.TCKind._tk_null;
50
51     /**
52      ** Int constant for void CORBA::TypeCode kind.
53      **/

54     public static final int _tk_void = org.omg.CORBA.TCKind._tk_void;
55
56     /**
57      ** Int constant for short CORBA::TypeCode kind.
58      **/

59     public static final int _tk_short = org.omg.CORBA.TCKind._tk_short;
60
61     /**
62      ** Int constant for long CORBA::TypeCode kind.
63      **/

64     public static final int _tk_long = org.omg.CORBA.TCKind._tk_long;
65
66     /**
67      ** Int constant for ushort CORBA::TypeCode kind.
68      **/

69     public static final int _tk_ushort = org.omg.CORBA.TCKind._tk_ushort;
70
71     /**
72      ** Int constant for ulong CORBA::TypeCode kind.
73      **/

74     public static final int _tk_ulong = org.omg.CORBA.TCKind._tk_ulong;
75
76     /**
77      ** Int constant for float CORBA::TypeCode kind.
78      **/

79     public static final int _tk_float = org.omg.CORBA.TCKind._tk_float;
80
81     /**
82      ** Int constant for double CORBA::TypeCode kind.
83      **/

84     public static final int _tk_double = org.omg.CORBA.TCKind._tk_double;
85
86     /**
87      ** Int constant for boolean CORBA::TypeCode kind.
88      **/

89     public static final int _tk_boolean = org.omg.CORBA.TCKind._tk_boolean;
90
91     /**
92      ** Int constant for char CORBA::TypeCode kind.
93      **/

94     public static final int _tk_char = org.omg.CORBA.TCKind._tk_char;
95
96     /**
97      ** Int constant for octet CORBA::TypeCode kind.
98      **/

99     public static final int _tk_octet = org.omg.CORBA.TCKind._tk_octet;
100
101     /**
102      ** Int constant for any CORBA::TypeCode kind.
103      **/

104     public static final int _tk_any = org.omg.CORBA.TCKind._tk_any;
105
106     /**
107      ** Int constant for TypeCode CORBA::TypeCode kind.
108      **/

109     public static final int _tk_TypeCode = org.omg.CORBA.TCKind._tk_TypeCode;
110
111     /**
112      ** Int constant for Principal CORBA::TypeCode kind.
113      **/

114     public static final int _tk_Principal = org.omg.CORBA.TCKind._tk_Principal;
115
116     /**
117      ** Int constant for object ref CORBA::TypeCode kind.
118      **/

119     public static final int _tk_objref = org.omg.CORBA.TCKind._tk_objref;
120
121     /**
122      ** Int constant for struct CORBA::TypeCode kind.
123      **/

124     public static final int _tk_struct = org.omg.CORBA.TCKind._tk_struct;
125
126     /**
127      ** Int constant for union CORBA::TypeCode kind.
128      **/

129     public static final int _tk_union = org.omg.CORBA.TCKind._tk_union;
130
131     /**
132      ** Int constant for enum CORBA::TypeCode kind.
133      **/

134     public static final int _tk_enum = org.omg.CORBA.TCKind._tk_enum;
135
136     /**
137      ** Int constant for string CORBA::TypeCode kind.
138      **/

139     public static final int _tk_string = org.omg.CORBA.TCKind._tk_string;
140
141     /**
142      ** Int constant for sequence CORBA::TypeCode kind.
143      **/

144     public static final int _tk_sequence = org.omg.CORBA.TCKind._tk_sequence;
145
146     /**
147      ** Int constant for array CORBA::TypeCode kind.
148      **/

149     public static final int _tk_array = org.omg.CORBA.TCKind._tk_array;
150
151     /**
152      ** Int constant for alias CORBA::TypeCode kind.
153      **/

154     public static final int _tk_alias = org.omg.CORBA.TCKind._tk_alias;
155
156     /**
157      ** Int constant for exception CORBA::TypeCode kind.
158      **/

159     public static final int _tk_exception = org.omg.CORBA.TCKind._tk_except;
160
161     /**
162      ** Int constant for long long CORBA::TypeCode kind.
163      **/

164     public static final int _tk_longlong = org.omg.CORBA.TCKind._tk_longlong;
165
166     /**
167      ** Int constant for ulong long CORBA::TypeCode kind.
168      **/

169     public static final int _tk_ulonglong = org.omg.CORBA.TCKind._tk_ulonglong;
170
171     /**
172      ** Int constant for long double CORBA::TypeCode kind.
173      **/

174     public static final int _tk_longdouble = org.omg.CORBA.TCKind._tk_longdouble;
175
176     /**
177      ** Int constant for wchar CORBA::TypeCode kind.
178      **/

179     public static final int _tk_wchar = org.omg.CORBA.TCKind._tk_wchar;
180
181     /**
182      ** Int constant for wstring CORBA::TypeCode kind.
183      **/

184     public static final int _tk_wstring = org.omg.CORBA.TCKind._tk_wstring;
185
186     /**
187      ** Int constant for fixed CORBA::TypeCode kind.
188      **/

189     public static final int _tk_fixed = org.omg.CORBA.TCKind._tk_fixed;
190
191     /**
192      ** Int constant for value box CORBA::TypeCode kind.
193      **/

194     public static final int _tk_value_box = org.omg.CORBA.TCKind._tk_value_box;
195
196     /**
197      ** Int constant for value CORBA::TypeCode kind.
198      **/

199     public static final int _tk_value = org.omg.CORBA.TCKind._tk_value;
200
201     /**
202      ** Int constant for native CORBA::TypeCode kind.
203      **/

204     public static final int _tk_native = org.omg.CORBA.TCKind._tk_native;
205
206     /**
207      ** Int constant for abstract interface CORBA::TypeCode kind.
208      **/

209     public static final int _tk_abstract_interface = org.omg.CORBA.TCKind._tk_abstract_interface;
210
211     /**
212      ** Int constant for interface CORBA::TypeCode kind.
213      **/

214     public static final int _tk_interface = 99;
215     // not defined ! org.omg.CORBA.TCKind._tk_interface;
216

217     /**
218      ** Int constant for local interface CORBA::TypeCode kind.
219      **/

220     public static final int _tk_local_interface = 100;
221     // not defined ! org.omg.CORBA.TCKind._tk_local_interface;
222

223     /**
224      ** Int constant for component CORBA::TypeCode kind.
225      **/

226     public static final int _tk_component = 101;
227     // not defined ! org.omg.CORBA.TCKind._tk_component;
228

229     /**
230      ** Int constant for home CORBA::TypeCode kind.
231      **/

232     public static final int _tk_home = 102;
233     // not defined ! org.omg.CORBA.TCKind._tk_home;
234

235     /**
236      ** Int constant for event CORBA::TypeCode kind.
237      **/

238     public static final int _tk_event = 103;
239     // not defined ! org.omg.CORBA.TCKind._tk_event;
240

241     // ==================================================================
242
//
243
// Public static methods.
244
//
245
// ==================================================================
246

247     /**
248      **
249      **/

250     public static String JavaDoc
251     toString(int kind)
252     {
253         switch(kind)
254         {
255         case _tk_null :
256             return "null";
257         case _tk_void :
258             return "void";
259         case _tk_short :
260             return "short";
261         case _tk_long :
262             return "long";
263         case _tk_ushort :
264             return "ushort";
265         case _tk_ulong :
266             return "ulong";
267         case _tk_float :
268             return "float";
269         case _tk_double :
270             return "double";
271         case _tk_boolean :
272             return "boolean";
273         case _tk_char :
274             return "char";
275         case _tk_octet :
276             return "octet";
277         case _tk_any :
278             return "any";
279         case _tk_TypeCode :
280             return "typecode";
281         case _tk_Principal :
282             return "principal";
283         case _tk_objref :
284             return "objref";
285         case _tk_struct :
286             return "struct";
287         case _tk_union :
288             return "union";
289         case _tk_enum :
290             return "enum";
291         case _tk_string :
292             return "string";
293         case _tk_sequence :
294             return "sequence";
295         case _tk_array :
296             return "array";
297         case _tk_alias :
298             return "alias";
299         case _tk_exception :
300             return "exception";
301         case _tk_longlong :
302             return "longlong";
303         case _tk_ulonglong :
304             return "ulonglong";
305         case _tk_longdouble :
306             return "longdouble";
307         case _tk_wchar :
308             return "wchar";
309         case _tk_wstring :
310             return "wstring";
311         case _tk_fixed :
312             return "fixed";
313         case _tk_value_box :
314             return "value_box";
315         case _tk_value :
316             return "value";
317         case _tk_native :
318             return "native";
319         case _tk_abstract_interface :
320             return "abstract_interface";
321         case _tk_local_interface :
322             return "local_interface";
323         case _tk_interface :
324             return "interface";
325         case _tk_component :
326             return "component";
327         case _tk_home :
328             return "home";
329         case _tk_event :
330             return "event";
331         default :
332             return "null";
333         }
334     }
335 }
336
Popular Tags