KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > omg > CORBA > PrimitiveKind


1 /***** Copyright (c) 1999-2000 Object Management Group. Unlimited rights to
2        duplicate and use this code are hereby granted provided that this
3        copyright notice is included.
4 *****/

5
6 package org.omg.CORBA;
7
8 public class PrimitiveKind implements org.omg.CORBA.portable.IDLEntity JavaDoc {
9
10     public static final int _pk_null = 0;
11     public static final PrimitiveKind JavaDoc pk_null = new PrimitiveKind JavaDoc(_pk_null);
12
13     public static final int _pk_void = 1;
14     public static final PrimitiveKind JavaDoc pk_void = new PrimitiveKind JavaDoc(_pk_void);
15
16     public static final int _pk_short = 2;
17     public static final PrimitiveKind JavaDoc pk_short = new PrimitiveKind JavaDoc(_pk_short);
18
19     public static final int _pk_long = 3;
20     public static final PrimitiveKind JavaDoc pk_long = new PrimitiveKind JavaDoc(_pk_long);
21
22     public static final int _pk_ushort = 4;
23     public static final PrimitiveKind JavaDoc pk_ushort =
24             new PrimitiveKind JavaDoc(_pk_ushort);
25
26     public static final int _pk_ulong = 5;
27     public static final PrimitiveKind JavaDoc pk_ulong = new PrimitiveKind JavaDoc(_pk_ulong);
28
29     public static final int _pk_float = 6;
30     public static final PrimitiveKind JavaDoc pk_float = new PrimitiveKind JavaDoc(_pk_float);
31
32     public static final int _pk_double = 7;
33     public static final PrimitiveKind JavaDoc pk_double =
34             new PrimitiveKind JavaDoc(_pk_double);
35
36     public static final int _pk_boolean = 8;
37     public static final PrimitiveKind JavaDoc pk_boolean =
38             new PrimitiveKind JavaDoc(_pk_boolean);
39
40     public static final int _pk_char = 9;
41     public static final PrimitiveKind JavaDoc pk_char = new PrimitiveKind JavaDoc(_pk_char);
42
43     public static final int _pk_octet = 10;
44     public static final PrimitiveKind JavaDoc pk_octet = new PrimitiveKind JavaDoc(_pk_octet);
45
46     public static final int _pk_any = 11;
47     public static final PrimitiveKind JavaDoc pk_any = new PrimitiveKind JavaDoc(_pk_any);
48
49     public static final int _pk_TypeCode = 12;
50     public static final PrimitiveKind JavaDoc pk_TypeCode =
51             new PrimitiveKind JavaDoc(_pk_TypeCode);
52
53     public static final int _pk_Principal = 13;
54     public static final PrimitiveKind JavaDoc pk_Principal =
55             new PrimitiveKind JavaDoc(_pk_Principal);
56
57     public static final int _pk_string = 14;
58     public static final PrimitiveKind JavaDoc pk_string =
59             new PrimitiveKind JavaDoc(_pk_string);
60
61     public static final int _pk_objref= 15;
62     public static final PrimitiveKind JavaDoc pk_objref =
63             new PrimitiveKind JavaDoc(_pk_objref);
64
65     public static final int _pk_longlong = 16;
66     public static final PrimitiveKind JavaDoc pk_longlong =
67             new PrimitiveKind JavaDoc(_pk_longlong);
68
69     public static final int _pk_ulonglong = 17;
70     public static final PrimitiveKind JavaDoc pk_ulonglong =
71             new PrimitiveKind JavaDoc(_pk_ulonglong);
72
73     public static final int _pk_longdouble = 18;
74     public static final PrimitiveKind JavaDoc pk_longdouble =
75             new PrimitiveKind JavaDoc(_pk_longdouble);
76
77     public static final int _pk_wchar = 19;
78     public static final PrimitiveKind JavaDoc pk_wchar = new PrimitiveKind JavaDoc(_pk_wchar);
79
80     public static final int _pk_wstring = 20;
81     public static final PrimitiveKind JavaDoc pk_wstring =
82             new PrimitiveKind JavaDoc(_pk_wstring);
83
84     public static final int _pk_value_base = 21;
85     public static final PrimitiveKind JavaDoc pk_value_base
86             = new PrimitiveKind JavaDoc(_pk_value_base);
87
88     public int value() {
89         throw new org.omg.CORBA.NO_IMPLEMENT JavaDoc();
90     }
91
92     public static PrimitiveKind JavaDoc from_int(int val)
93                 /* Issue 3669 throws org.omg.CORBA.BAD_PARAM */ {
94     switch (val) {
95         case _pk_null:
96             return pk_null;
97         case _pk_void:
98             return pk_void;
99         case _pk_short:
100             return pk_short;
101         case _pk_long:
102             return pk_long;
103         case _pk_ushort:
104             return pk_ushort;
105         case _pk_ulong:
106             return pk_ulong;
107         case _pk_float:
108             return pk_float;
109         case _pk_double:
110             return pk_double;
111         case _pk_boolean:
112             return pk_boolean;
113         case _pk_char:
114             return pk_char;
115         case _pk_octet:
116             return pk_octet;
117         case _pk_any:
118             return pk_any;
119         case _pk_TypeCode:
120             return pk_TypeCode;
121         case _pk_Principal:
122             return pk_Principal;
123         case _pk_string:
124             return pk_string;
125         case _pk_objref:
126             return pk_objref;
127         case _pk_longlong:
128             return pk_longlong;
129         case _pk_ulonglong:
130             return pk_ulonglong;
131         case _pk_longdouble:
132             return pk_longdouble;
133         case _pk_wchar:
134             return pk_wchar;
135         case _pk_wstring:
136             return pk_wstring;
137         case _pk_value_base:
138             return pk_value_base;
139     default:
140         throw new org.omg.CORBA.BAD_PARAM JavaDoc();
141     }
142     }
143
144     protected PrimitiveKind(int _value) {
145         throw new org.omg.CORBA.NO_IMPLEMENT JavaDoc();
146     }
147
148     public java.lang.Object JavaDoc readResolve() throws java.io.ObjectStreamException JavaDoc
149     {
150     return from_int( value() ) ;
151     }
152 }
153
Popular Tags