001: /***** Copyright (c) 1999-2000 Object Management Group. Unlimited rights to
002: duplicate and use this code are hereby granted provided that this
003: copyright notice is included.
004: *****/package org.omg.CORBA;
005:
006: public class PrimitiveKind implements org.omg.CORBA.portable.IDLEntity {
007:
008: public static final int _pk_null = 0;
009: public static final PrimitiveKind pk_null = new PrimitiveKind(
010: _pk_null);
011:
012: public static final int _pk_void = 1;
013: public static final PrimitiveKind pk_void = new PrimitiveKind(
014: _pk_void);
015:
016: public static final int _pk_short = 2;
017: public static final PrimitiveKind pk_short = new PrimitiveKind(
018: _pk_short);
019:
020: public static final int _pk_long = 3;
021: public static final PrimitiveKind pk_long = new PrimitiveKind(
022: _pk_long);
023:
024: public static final int _pk_ushort = 4;
025: public static final PrimitiveKind pk_ushort = new PrimitiveKind(
026: _pk_ushort);
027:
028: public static final int _pk_ulong = 5;
029: public static final PrimitiveKind pk_ulong = new PrimitiveKind(
030: _pk_ulong);
031:
032: public static final int _pk_float = 6;
033: public static final PrimitiveKind pk_float = new PrimitiveKind(
034: _pk_float);
035:
036: public static final int _pk_double = 7;
037: public static final PrimitiveKind pk_double = new PrimitiveKind(
038: _pk_double);
039:
040: public static final int _pk_boolean = 8;
041: public static final PrimitiveKind pk_boolean = new PrimitiveKind(
042: _pk_boolean);
043:
044: public static final int _pk_char = 9;
045: public static final PrimitiveKind pk_char = new PrimitiveKind(
046: _pk_char);
047:
048: public static final int _pk_octet = 10;
049: public static final PrimitiveKind pk_octet = new PrimitiveKind(
050: _pk_octet);
051:
052: public static final int _pk_any = 11;
053: public static final PrimitiveKind pk_any = new PrimitiveKind(
054: _pk_any);
055:
056: public static final int _pk_TypeCode = 12;
057: public static final PrimitiveKind pk_TypeCode = new PrimitiveKind(
058: _pk_TypeCode);
059:
060: public static final int _pk_Principal = 13;
061: public static final PrimitiveKind pk_Principal = new PrimitiveKind(
062: _pk_Principal);
063:
064: public static final int _pk_string = 14;
065: public static final PrimitiveKind pk_string = new PrimitiveKind(
066: _pk_string);
067:
068: public static final int _pk_objref = 15;
069: public static final PrimitiveKind pk_objref = new PrimitiveKind(
070: _pk_objref);
071:
072: public static final int _pk_longlong = 16;
073: public static final PrimitiveKind pk_longlong = new PrimitiveKind(
074: _pk_longlong);
075:
076: public static final int _pk_ulonglong = 17;
077: public static final PrimitiveKind pk_ulonglong = new PrimitiveKind(
078: _pk_ulonglong);
079:
080: public static final int _pk_longdouble = 18;
081: public static final PrimitiveKind pk_longdouble = new PrimitiveKind(
082: _pk_longdouble);
083:
084: public static final int _pk_wchar = 19;
085: public static final PrimitiveKind pk_wchar = new PrimitiveKind(
086: _pk_wchar);
087:
088: public static final int _pk_wstring = 20;
089: public static final PrimitiveKind pk_wstring = new PrimitiveKind(
090: _pk_wstring);
091:
092: public static final int _pk_value_base = 21;
093: public static final PrimitiveKind pk_value_base = new PrimitiveKind(
094: _pk_value_base);
095:
096: public int value() {
097: throw new org.omg.CORBA.NO_IMPLEMENT();
098: }
099:
100: public static PrimitiveKind from_int(int val)
101: /* Issue 3669 throws org.omg.CORBA.BAD_PARAM */{
102: switch (val) {
103: case _pk_null:
104: return pk_null;
105: case _pk_void:
106: return pk_void;
107: case _pk_short:
108: return pk_short;
109: case _pk_long:
110: return pk_long;
111: case _pk_ushort:
112: return pk_ushort;
113: case _pk_ulong:
114: return pk_ulong;
115: case _pk_float:
116: return pk_float;
117: case _pk_double:
118: return pk_double;
119: case _pk_boolean:
120: return pk_boolean;
121: case _pk_char:
122: return pk_char;
123: case _pk_octet:
124: return pk_octet;
125: case _pk_any:
126: return pk_any;
127: case _pk_TypeCode:
128: return pk_TypeCode;
129: case _pk_Principal:
130: return pk_Principal;
131: case _pk_string:
132: return pk_string;
133: case _pk_objref:
134: return pk_objref;
135: case _pk_longlong:
136: return pk_longlong;
137: case _pk_ulonglong:
138: return pk_ulonglong;
139: case _pk_longdouble:
140: return pk_longdouble;
141: case _pk_wchar:
142: return pk_wchar;
143: case _pk_wstring:
144: return pk_wstring;
145: case _pk_value_base:
146: return pk_value_base;
147: default:
148: throw new org.omg.CORBA.BAD_PARAM();
149: }
150: }
151:
152: protected PrimitiveKind(int _value) {
153: throw new org.omg.CORBA.NO_IMPLEMENT();
154: }
155:
156: public java.lang.Object readResolve()
157: throws java.io.ObjectStreamException {
158: return from_int(value());
159: }
160: }
|