1 /* 2 * %CopyrightBegin% 3 * 4 * Copyright Ericsson AB 1999-2016. All Rights Reserved. 5 * 6 * Licensed under the Apache License, Version 2.0 (the "License"); 7 * you may not use this file except in compliance with the License. 8 * You may obtain a copy of the License at 9 * 10 * http://www.apache.org/licenses/LICENSE-2.0 11 * 12 * Unless required by applicable law or agreed to in writing, software 13 * distributed under the License is distributed on an "AS IS" BASIS, 14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 * See the License for the specific language governing permissions and 16 * limitations under the License. 17 * 18 * %CopyrightEnd% 19 * 20 */ 21 /** 22 * The TCKind class for Java IDL 23 * 24 */ 25 package com.ericsson.otp.ic; 26 27 /** 28 The TCKind class is the implementation of the OMG-IDL enumerant type TCKind. 29 **/ 30 31 final public class TCKind { 32 33 // instance variables 34 public static final int _tk_null = 0, 35 _tk_void = 1, 36 _tk_short = 2, 37 _tk_long = 3, 38 _tk_ushort = 4, 39 _tk_ulong = 5, 40 _tk_float = 6, 41 _tk_double = 7, 42 _tk_boolean = 8, 43 _tk_char = 9, 44 _tk_octet = 10, 45 _tk_any = 11, 46 _tk_TypeCode = 12, 47 _tk_Principal = 13, 48 _tk_objref = 14, 49 _tk_struct = 15, 50 _tk_union = 16, 51 _tk_enum = 17, 52 _tk_string = 18, 53 _tk_sequence = 19, 54 _tk_array = 20, 55 _tk_alias = 21, 56 _tk_except = 22, 57 _tk_longlong = 23, 58 _tk_ulonglong = 24, 59 _tk_longdouble = 25, 60 _tk_wchar = 26, 61 _tk_wstring = 27, 62 _tk_fixed = 28, 63 _tk_atom = 20000, /* Used for union label default value only */ 64 _tk_pid = 20001, /* Used for special pid struct */ 65 _tk_port = 20002, /* Used for special port struct */ 66 _tk_ref = 20003, /* Used for special ref struct */ 67 _tk_term = 20004; /* Used for special term struct */ 68 69 public static final TCKind tk_null = new TCKind(_tk_null); 70 public static final TCKind tk_void = new TCKind(_tk_void); 71 public static final TCKind tk_short = new TCKind(_tk_short); 72 public static final TCKind tk_long = new TCKind(_tk_long); 73 public static final TCKind tk_ushort = new TCKind(_tk_ushort); 74 public static final TCKind tk_ulong = new TCKind(_tk_ulong); 75 public static final TCKind tk_float = new TCKind(_tk_float); 76 public static final TCKind tk_double = new TCKind(_tk_double); 77 public static final TCKind tk_boolean = new TCKind(_tk_boolean); 78 public static final TCKind tk_char = new TCKind(_tk_char); 79 public static final TCKind tk_octet = new TCKind(_tk_octet); 80 public static final TCKind tk_any = new TCKind(_tk_any); 81 public static final TCKind tk_TypeCode = new TCKind(_tk_TypeCode); 82 public static final TCKind tk_Principal = new TCKind(_tk_Principal); 83 public static final TCKind tk_objref = new TCKind(_tk_objref); 84 public static final TCKind tk_struct = new TCKind(_tk_struct); 85 public static final TCKind tk_union = new TCKind(_tk_union); 86 public static final TCKind tk_enum = new TCKind(_tk_enum); 87 public static final TCKind tk_string = new TCKind(_tk_string); 88 public static final TCKind tk_sequence = new TCKind(_tk_sequence); 89 public static final TCKind tk_array = new TCKind(_tk_array); 90 public static final TCKind tk_alias = new TCKind(_tk_alias); 91 public static final TCKind tk_except = new TCKind(_tk_except); 92 public static final TCKind tk_longlong = new TCKind(_tk_longlong); 93 public static final TCKind tk_ulonglong = new TCKind(_tk_ulonglong); 94 public static final TCKind tk_longdouble = new TCKind(_tk_longdouble); 95 public static final TCKind tk_wchar = new TCKind(_tk_wchar); 96 public static final TCKind tk_wstring = new TCKind(_tk_wstring); 97 public static final TCKind tk_fixed = new TCKind(_tk_fixed); 98 protected static final TCKind tk_atom = new TCKind(_tk_atom); 99 protected static final TCKind tk_pid = new TCKind(_tk_pid); 100 protected static final TCKind tk_port = new TCKind(_tk_port); 101 protected static final TCKind tk_ref = new TCKind(_tk_ref); 102 protected static final TCKind tk_term = new TCKind(_tk_term); 103 private int _value; 104 105 // constructors TCKind(int __value)106 private TCKind(int __value) { 107 _value = __value; 108 } 109 110 // methods 111 112 /** 113 Accessor method for the value of TCKind. 114 @return int, the value of TCKind object 115 **/ value()116 public int value() { 117 return _value; 118 } 119 120 /** 121 Translator method for TCKind. 122 Traslates the input integer value to a TCKind enumerant object. 123 @return TCKind, a TCKind object 124 **/ from_int(int __value)125 public static final TCKind from_int(int __value) throws java.lang.Exception { 126 switch (__value) { 127 case _tk_null: 128 return tk_null; 129 case _tk_void: 130 return tk_void; 131 case _tk_short: 132 return tk_short; 133 case _tk_long: 134 return tk_long; 135 case _tk_ushort: 136 return tk_ushort; 137 case _tk_ulong: 138 return tk_ulong; 139 case _tk_float: 140 return tk_float; 141 case _tk_double: 142 return tk_double; 143 case _tk_boolean: 144 return tk_boolean; 145 case _tk_char: 146 return tk_char; 147 case _tk_octet: 148 return tk_octet; 149 case _tk_any: 150 return tk_any; 151 case _tk_TypeCode: 152 return tk_TypeCode; 153 case _tk_Principal: 154 return tk_Principal; 155 case _tk_objref: 156 return tk_objref; 157 case _tk_struct: 158 return tk_struct; 159 case _tk_union: 160 return tk_union; 161 case _tk_enum: 162 return tk_enum; 163 case _tk_string: 164 return tk_string; 165 case _tk_sequence: 166 return tk_sequence; 167 case _tk_array: 168 return tk_array; 169 case _tk_alias: 170 return tk_alias; 171 case _tk_except: 172 return tk_except; 173 case _tk_longlong: 174 return tk_longlong; 175 case _tk_ulonglong: 176 return tk_ulonglong; 177 case _tk_longdouble: 178 return tk_longdouble; 179 case _tk_wchar: 180 return tk_wchar; 181 case _tk_wstring: 182 return tk_wstring; 183 case _tk_fixed: 184 return tk_fixed; 185 case _tk_atom: 186 return tk_atom; 187 case _tk_pid: 188 return tk_pid; 189 case _tk_port: 190 return tk_port; 191 case _tk_ref: 192 return tk_ref; 193 case _tk_term: 194 return tk_term; 195 default: 196 throw new java.lang.Exception(""); 197 } 198 } 199 200 } 201