0N/A/*
239N/A * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
0N/A *
0N/A * This code is free software; you can redistribute it and/or modify it
0N/A * under the terms of the GNU General Public License version 2 only, as
157N/A * published by the Free Software Foundation. Oracle designates this
0N/A * particular file as subject to the "Classpath" exception as provided
157N/A * by Oracle in the LICENSE file that accompanied this code.
0N/A *
0N/A * This code is distributed in the hope that it will be useful, but WITHOUT
0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
0N/A * version 2 for more details (a copy is included in the LICENSE file that
0N/A * accompanied this code).
0N/A *
0N/A * You should have received a copy of the GNU General Public License version
0N/A * 2 along with this work; if not, write to the Free Software Foundation,
0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
0N/A *
157N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
157N/A * or visit www.oracle.com if you need additional information or have any
157N/A * questions.
0N/A */
0N/A
0N/Apackage org.omg.CORBA;
0N/A
0N/A
0N/A/**
0N/A * The Java mapping of the IDL enum <code>TCKind</code>, which
0N/A * specifies the kind of a <code>TypeCode</code> object. There is
0N/A * one kind for each primitive and essential IDL data type.
0N/A * <P>
0N/A * The class <code>TCKind</code> consists of:
0N/A * <UL>
0N/A * <LI>a set of <code>int</code> constants, one for each
0N/A * kind of IDL data type. These <code>int</code> constants
0N/A * make it possible to use a <code>switch</code> statement.
0N/A * <LI>a set of <code>TCKind</code> constants, one for each
0N/A * kind of IDL data type. The <code>value</code> field for
0N/A * each <code>TCKind</code> instance is initialized with
0N/A * the <code>int</code> constant that corresponds with
0N/A * the IDL data type that the instance represents.
0N/A * <LI>the method <code>from_int</code>for converting
0N/A * an <code>int</code> to its
0N/A * corresponding <code>TCKind</code> instance
0N/A * <P>Example:
0N/A * <PRE>
0N/A * org.omg.CORBA.TCKind k = org.omg.CORBA.TCKind.from_int(
0N/A * org.omg.CORBA.TCKind._tk_string);
0N/A * </PRE>
0N/A * The variable <code>k</code> represents the <code>TCKind</code>
0N/A * instance for the IDL type <code>string</code>, which is
0N/A * <code>tk_string</code>.
0N/A * <P>
0N/A * <LI>the method <code>value</code> for accessing the
0N/A * <code>_value</code> field of a <code>TCKind</code> constant
0N/A * <P>Example:
0N/A * <PRE>
0N/A * int i = org.omg.CORBA.TCKind.tk_char.value();
0N/A * </PRE>
0N/A * The variable <code>i</code> represents 9, the value for the
0N/A * IDL data type <code>char</code>.
0N/A * </UL>
0N/A * <P>The <code>value</code> field of a <code>TCKind</code> instance
0N/A * is the CDR encoding used for a <code>TypeCode</code> object in
0N/A * an IIOP message.
0N/A */
0N/A
0N/Apublic class TCKind {
0N/A
0N/A /**
0N/A * The <code>int</code> constant for a <code>null</code> IDL data type.
0N/A */
0N/A public static final int _tk_null = 0;
0N/A
0N/A /**
0N/A * The <code>int</code> constant for the IDL data type <code>void</code>.
0N/A */
0N/A public static final int _tk_void = 1;
0N/A
0N/A /**
0N/A * The <code>int</code> constant for the IDL data type <code>short</code>.
0N/A */
0N/A public static final int _tk_short = 2;
0N/A
0N/A /**
0N/A * The <code>int</code> constant for the IDL data type <code>long</code>.
0N/A */
0N/A public static final int _tk_long = 3;
0N/A
0N/A /**
0N/A * The <code>int</code> constant for the IDL data type <code>ushort</code>.
0N/A */
0N/A public static final int _tk_ushort = 4;
0N/A
0N/A /**
0N/A * The <code>int</code> constant for the IDL data type <code>ulong</code>.
0N/A */
0N/A public static final int _tk_ulong = 5;
0N/A
0N/A /**
0N/A * The <code>int</code> constant for the IDL data type <code>float</code>.
0N/A */
0N/A public static final int _tk_float = 6;
0N/A
0N/A /**
0N/A * The <code>int</code> constant for the IDL data type <code>double</code>.
0N/A */
0N/A public static final int _tk_double = 7;
0N/A
0N/A /**
0N/A * The <code>int</code> constant for the IDL data type <code>boolean</code>.
0N/A */
0N/A public static final int _tk_boolean = 8;
0N/A
0N/A /**
0N/A * The <code>int</code> constant for the IDL data type <code>char</code>.
0N/A */
0N/A public static final int _tk_char = 9;
0N/A
0N/A /**
0N/A * The <code>int</code> constant for the IDL data type <code>octet</code>.
0N/A */
0N/A public static final int _tk_octet = 10;
0N/A
0N/A /**
0N/A * The <code>int</code> constant for the IDL data type <code>any</code>.
0N/A */
0N/A public static final int _tk_any = 11;
0N/A
0N/A /**
0N/A * The <code>int</code> constant for the IDL data type <code>TypeCode</code>.
0N/A */
0N/A public static final int _tk_TypeCode = 12;
0N/A
0N/A /**
0N/A * The <code>int</code> constant for the IDL data type <code>Principal</code>.
0N/A */
0N/A public static final int _tk_Principal = 13;
0N/A
0N/A /**
0N/A * The <code>int</code> constant for the IDL data type <code>objref</code>.
0N/A */
0N/A public static final int _tk_objref = 14;
0N/A
0N/A /**
0N/A * The <code>int</code> constant for the IDL data type <code>struct</code>.
0N/A */
0N/A public static final int _tk_struct = 15;
0N/A
0N/A /**
0N/A * The <code>int</code> constant for the IDL data type <code>union</code>.
0N/A */
0N/A public static final int _tk_union = 16;
0N/A
0N/A /**
0N/A * The <code>int</code> constant for the IDL data type <code>enum</code>.
0N/A */
0N/A public static final int _tk_enum = 17;
0N/A
0N/A /**
0N/A * The <code>int</code> constant for the IDL data type <code>string</code>.
0N/A */
0N/A public static final int _tk_string = 18;
0N/A
0N/A /**
0N/A * The <code>int</code> constant for the IDL data type <code>sequence</code>.
0N/A */
0N/A public static final int _tk_sequence = 19;
0N/A
0N/A /**
0N/A * The <code>int</code> constant for the IDL data type <code>array</code>.
0N/A */
0N/A public static final int _tk_array = 20;
0N/A
0N/A /**
0N/A * The <code>int</code> constant for the IDL data type <code>alias</code>.
0N/A */
0N/A public static final int _tk_alias = 21;
0N/A
0N/A /**
0N/A * The <code>int</code> constant for the IDL data type <code>except</code>.
0N/A */
0N/A public static final int _tk_except = 22;
0N/A
0N/A /**
0N/A * The <code>int</code> constant for the IDL data type <code>longlong</code>.
0N/A */
0N/A public static final int _tk_longlong = 23;
0N/A
0N/A /**
0N/A * The <code>int</code> constant for the IDL data type <code>ulonglong</code>.
0N/A */
0N/A public static final int _tk_ulonglong = 24;
0N/A
0N/A /**
0N/A * The <code>int</code> constant for the IDL data type <code>longdouble</code>.
0N/A */
0N/A public static final int _tk_longdouble = 25;
0N/A
0N/A /**
0N/A * The <code>int</code> constant for the IDL data type <code>wchar</code>.
0N/A */
0N/A public static final int _tk_wchar = 26;
0N/A
0N/A /**
0N/A * The <code>int</code> constant for the IDL data type <code>wstring</code>.
0N/A */
0N/A public static final int _tk_wstring = 27;
0N/A
0N/A /**
0N/A * The <code>int</code> constant for the IDL data type <code>fixed</code>.
0N/A */
0N/A public static final int _tk_fixed = 28;
0N/A
0N/A /**
0N/A * The <code>int</code> constant for the IDL data type <code>value</code>.
0N/A */
0N/A public static final int _tk_value = 29; // orbos 98-01-18: Objects By Value
0N/A
0N/A /**
0N/A * The <code>int</code> constant for the IDL data type <code>value_box</code>.
0N/A */
0N/A public static final int _tk_value_box = 30; // orbos 98-01-18: Objects By Value
0N/A
0N/A /**
0N/A * The <code>int</code> constant for the IDL data type <code>native</code>.
0N/A */
0N/A public static final int _tk_native = 31; // Verify
0N/A
0N/A /**
0N/A * The <code>int</code> constant for the IDL data type <code>abstract interface</code>.
0N/A */
0N/A public static final int _tk_abstract_interface = 32;
0N/A
0N/A
0N/A /**
0N/A * The <code>TCKind</code> constant whose <code>value</code> field is
0N/A * initialized with <code>TCKind._tk_null</code>.
0N/A */
0N/A public static final TCKind tk_null = new TCKind(_tk_null);
0N/A
0N/A /**
0N/A * The <code>TCKind</code> constant whose <code>value</code> field is
0N/A * initialized with <code>TCKind._tk_void</code>.
0N/A */
0N/A public static final TCKind tk_void = new TCKind(_tk_void);
0N/A
0N/A /**
0N/A * The <code>TCKind</code> constant whose <code>value</code> field is
0N/A * initialized with <code>TCKind._tk_short</code>.
0N/A */
0N/A public static final TCKind tk_short = new TCKind(_tk_short);
0N/A
0N/A /**
0N/A * The <code>TCKind</code> constant whose <code>value</code> field is
0N/A * initialized with <code>TCKind._tk_long</code>.
0N/A */
0N/A public static final TCKind tk_long = new TCKind(_tk_long);
0N/A
0N/A /**
0N/A * The <code>TCKind</code> constant whose <code>value</code> field is
0N/A * initialized with <code>TCKind._tk_ushort</code>.
0N/A */
0N/A public static final TCKind tk_ushort = new TCKind(_tk_ushort);
0N/A
0N/A /**
0N/A * The <code>TCKind</code> constant whose <code>value</code> field is
0N/A * initialized with <code>TCKind._tk_ulong</code>.
0N/A */
0N/A public static final TCKind tk_ulong = new TCKind(_tk_ulong);
0N/A
0N/A /**
0N/A * The <code>TCKind</code> constant whose <code>value</code> field is
0N/A * initialized with <code>TCKind._tk_float</code>.
0N/A */
0N/A public static final TCKind tk_float = new TCKind(_tk_float);
0N/A
0N/A /**
0N/A * The <code>TCKind</code> constant whose <code>value</code> field is
0N/A * initialized with <code>TCKind._tk_double</code>.
0N/A */
0N/A public static final TCKind tk_double = new TCKind(_tk_double);
0N/A
0N/A /**
0N/A * The <code>TCKind</code> constant whose <code>value</code> field is
0N/A * initialized with <code>TCKind._tk_boolean</code>.
0N/A */
0N/A public static final TCKind tk_boolean = new TCKind(_tk_boolean);
0N/A
0N/A /**
0N/A * The <code>TCKind</code> constant whose <code>value</code> field is
0N/A * initialized with <code>TCKind._tk_char</code>.
0N/A */
0N/A public static final TCKind tk_char = new TCKind(_tk_char);
0N/A
0N/A /**
0N/A * The <code>TCKind</code> constant whose <code>value</code> field is
0N/A * initialized with <code>TCKind._tk_octet</code>.
0N/A */
0N/A public static final TCKind tk_octet = new TCKind(_tk_octet);
0N/A
0N/A /**
0N/A * The <code>TCKind</code> constant whose <code>value</code> field is
0N/A * initialized with <code>TCKind._tk_any</code>.
0N/A */
0N/A public static final TCKind tk_any = new TCKind(_tk_any);
0N/A
0N/A /**
0N/A * The <code>TCKind</code> constant whose <code>value</code> field is
0N/A * initialized with <code>TCKind._tk_TypeCode</code>.
0N/A */
0N/A public static final TCKind tk_TypeCode = new TCKind(_tk_TypeCode);
0N/A
0N/A /**
0N/A * The <code>TCKind</code> constant whose <code>value</code> field is
0N/A * initialized with <code>TCKind._tk_Principal</code>.
0N/A */
0N/A public static final TCKind tk_Principal = new TCKind(_tk_Principal);
0N/A
0N/A /**
0N/A * The <code>TCKind</code> constant whose <code>value</code> field is
0N/A * initialized with <code>TCKind._tk_objref</code>.
0N/A */
0N/A public static final TCKind tk_objref = new TCKind(_tk_objref);
0N/A
0N/A /**
0N/A * The <code>TCKind</code> constant whose <code>value</code> field is
0N/A * initialized with <code>TCKind._tk_struct</code>.
0N/A */
0N/A public static final TCKind tk_struct = new TCKind(_tk_struct);
0N/A
0N/A /**
0N/A * The <code>TCKind</code> constant whose <code>value</code> field is
0N/A * initialized with <code>TCKind._tk_union</code>.
0N/A */
0N/A public static final TCKind tk_union = new TCKind(_tk_union);
0N/A
0N/A /**
0N/A * The <code>TCKind</code> constant whose <code>value</code> field is
0N/A * initialized with <code>TCKind._tk_enum</code>.
0N/A */
0N/A public static final TCKind tk_enum = new TCKind(_tk_enum);
0N/A
0N/A /**
0N/A * The <code>TCKind</code> constant whose <code>value</code> field is
0N/A * initialized with <code>TCKind._tk_string</code>.
0N/A */
0N/A public static final TCKind tk_string = new TCKind(_tk_string);
0N/A
0N/A /**
0N/A * The <code>TCKind</code> constant whose <code>value</code> field is
0N/A * initialized with <code>TCKind._tk_sequence</code>.
0N/A */
0N/A public static final TCKind tk_sequence = new TCKind(_tk_sequence);
0N/A
0N/A /**
0N/A * The <code>TCKind</code> constant whose <code>value</code> field is
0N/A * initialized with <code>TCKind._tk_array</code>.
0N/A */
0N/A public static final TCKind tk_array = new TCKind(_tk_array);
0N/A
0N/A /**
0N/A * The <code>TCKind</code> constant whose <code>value</code> field is
0N/A * initialized with <code>TCKind._tk_alias</code>.
0N/A */
0N/A public static final TCKind tk_alias = new TCKind(_tk_alias);
0N/A
0N/A /**
0N/A * The <code>TCKind</code> constant whose <code>value</code> field is
0N/A * initialized with <code>TCKind._tk_except</code>.
0N/A */
0N/A public static final TCKind tk_except = new TCKind(_tk_except);
0N/A
0N/A /**
0N/A * The <code>TCKind</code> constant whose <code>value</code> field is
0N/A * initialized with <code>TCKind._tk_longlong</code>.
0N/A */
0N/A public static final TCKind tk_longlong = new TCKind(_tk_longlong);
0N/A
0N/A /**
0N/A * The <code>TCKind</code> constant whose <code>value</code> field is
0N/A * initialized with <code>TCKind._tk_ulonglong</code>.
0N/A */
0N/A public static final TCKind tk_ulonglong = new TCKind(_tk_ulonglong);
0N/A
0N/A /**
0N/A * The <code>TCKind</code> constant whose <code>value</code> field is
0N/A * initialized with <code>TCKind._tk_longdouble</code>.
0N/A */
0N/A public static final TCKind tk_longdouble = new TCKind(_tk_longdouble);
0N/A
0N/A /**
0N/A * The <code>TCKind</code> constant whose <code>value</code> field is
0N/A * initialized with <code>TCKind._tk_wchar</code>.
0N/A */
0N/A public static final TCKind tk_wchar = new TCKind(_tk_wchar);
0N/A
0N/A /**
0N/A * The <code>TCKind</code> constant whose <code>value</code> field is
0N/A * initialized with <code>TCKind._tk_wstring</code>.
0N/A */
0N/A public static final TCKind tk_wstring = new TCKind(_tk_wstring);
0N/A
0N/A /**
0N/A * The <code>TCKind</code> constant whose <code>value</code> field is
0N/A * initialized with <code>TCKind._tk_fixed</code>.
0N/A */
0N/A public static final TCKind tk_fixed = new TCKind(_tk_fixed);
0N/A
0N/A // orbos 98-01-18: Objects By Value -- begin
0N/A
0N/A /**
0N/A * The <code>TCKind</code> constant whose <code>value</code> field is
0N/A * initialized with <code>TCKind._tk_value</code>.
0N/A */
0N/A public static final TCKind tk_value = new TCKind(_tk_value);
0N/A
0N/A /**
0N/A * The <code>TCKind</code> constant whose <code>value</code> field is
0N/A * initialized with <code>TCKind._tk_value_box</code>.
0N/A */
0N/A public static final TCKind tk_value_box = new TCKind(_tk_value_box);
0N/A // orbos 98-01-18: Objects By Value -- end
0N/A
0N/A /**
0N/A * The <code>TCKind</code> constant whose <code>value</code> field is
0N/A * initialized with <code>TCKind._tk_native</code>.
0N/A */
0N/A public static final TCKind tk_native = new TCKind(_tk_native);
0N/A
0N/A /**
0N/A * The <code>TCKind</code> constant whose <code>value</code> field is
0N/A * initialized with <code>TCKind._tk_abstract_interface</code>.
0N/A */
0N/A public static final TCKind tk_abstract_interface = new TCKind(_tk_abstract_interface);
0N/A
0N/A
0N/A
0N/A
0N/A /**
0N/A * Retrieves the value of this <code>TCKind</code> instance.
0N/A *
0N/A * @return the <code>int</code> that represents the kind of
0N/A * IDL data type for this <code>TCKind</code> instance
0N/A */
0N/A public int value() {
0N/A return _value;
0N/A }
0N/A
0N/A /**
0N/A * Converts the given <code>int</code> to the corresponding
0N/A * <code>TCKind</code> instance.
0N/A *
0N/A * @param i the <code>int</code> to convert. It must be one of
0N/A * the <code>int</code> constants in the class
0N/A * <code>TCKind</code>.
0N/A * @return the <code>TCKind</code> instance whose <code>value</code>
0N/A * field matches the given <code>int</code>
0N/A * @exception BAD_PARAM if the given <code>int</code> does not
0N/A * match the <code>_value</code> field of
0N/A * any <code>TCKind</code> instance
0N/A */
0N/A public static TCKind from_int(int i) {
0N/A switch (i) {
0N/A case _tk_null:
0N/A return tk_null;
0N/A case _tk_void:
0N/A return tk_void;
0N/A case _tk_short:
0N/A return tk_short;
0N/A case _tk_long:
0N/A return tk_long;
0N/A case _tk_ushort:
0N/A return tk_ushort;
0N/A case _tk_ulong:
0N/A return tk_ulong;
0N/A case _tk_float:
0N/A return tk_float;
0N/A case _tk_double:
0N/A return tk_double;
0N/A case _tk_boolean:
0N/A return tk_boolean;
0N/A case _tk_char:
0N/A return tk_char;
0N/A case _tk_octet:
0N/A return tk_octet;
0N/A case _tk_any:
0N/A return tk_any;
0N/A case _tk_TypeCode:
0N/A return tk_TypeCode;
0N/A case _tk_Principal:
0N/A return tk_Principal;
0N/A case _tk_objref:
0N/A return tk_objref;
0N/A case _tk_struct:
0N/A return tk_struct;
0N/A case _tk_union:
0N/A return tk_union;
0N/A case _tk_enum:
0N/A return tk_enum;
0N/A case _tk_string:
0N/A return tk_string;
0N/A case _tk_sequence:
0N/A return tk_sequence;
0N/A case _tk_array:
0N/A return tk_array;
0N/A case _tk_alias:
0N/A return tk_alias;
0N/A case _tk_except:
0N/A return tk_except;
0N/A case _tk_longlong:
0N/A return tk_longlong;
0N/A case _tk_ulonglong:
0N/A return tk_ulonglong;
0N/A case _tk_longdouble:
0N/A return tk_longdouble;
0N/A case _tk_wchar:
0N/A return tk_wchar;
0N/A case _tk_wstring:
0N/A return tk_wstring;
0N/A case _tk_fixed:
0N/A return tk_fixed;
0N/A case _tk_value: // orbos 98-01-18: Objects By Value
0N/A return tk_value;
0N/A case _tk_value_box: // orbos 98-01-18: Objects By Value
0N/A return tk_value_box;
0N/A case _tk_native:
0N/A return tk_native;
0N/A case _tk_abstract_interface:
0N/A return tk_abstract_interface;
0N/A default:
0N/A throw new org.omg.CORBA.BAD_PARAM();
0N/A }
0N/A }
0N/A
0N/A
0N/A /**
0N/A * Creates a new <code>TCKind</code> instance initialized with the given
0N/A * <code>int</code>.
0N/A * @deprecated Do not use this constructor as this method should be private
0N/A * according to the OMG specification. Use {@link #from_int(int)} instead.
0N/A *
0N/A * @param _value the <code>int</code> to convert. It must be one of
0N/A * the <code>int</code> constants in the class
0N/A * <code>TCKind</code>.
0N/A */
0N/A @Deprecated
0N/A protected TCKind(int _value){
0N/A this._value = _value;
0N/A }
0N/A private int _value;
0N/A}