< prev index next >

src/java.corba/share/classes/org/omg/CORBA/TCKind.java

Print this page


   1 /*
   2  * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any


  35  * <UL>
  36  * <LI>a set of <code>int</code> constants, one for each
  37  * kind of IDL data type.  These <code>int</code> constants
  38  * make it possible to use a <code>switch</code> statement.
  39  * <LI>a set of <code>TCKind</code> constants, one for each
  40  * kind of IDL data type.  The <code>value</code> field for
  41  * each <code>TCKind</code> instance is initialized with
  42  * the <code>int</code> constant that corresponds with
  43  * the IDL data type that the instance represents.
  44  * <LI>the method <code>from_int</code>for converting
  45  * an <code>int</code> to its
  46  * corresponding <code>TCKind</code> instance
  47  * <P>Example:
  48  * <PRE>
  49  *      org.omg.CORBA.TCKind k = org.omg.CORBA.TCKind.from_int(
  50  *                         org.omg.CORBA.TCKind._tk_string);
  51  * </PRE>
  52  * The variable <code>k</code> represents the <code>TCKind</code>
  53  * instance for the IDL type <code>string</code>, which is
  54  * <code>tk_string</code>.
  55  * <P>
  56  * <LI>the method <code>value</code> for accessing the
  57  * <code>_value</code> field of a <code>TCKind</code> constant
  58  * <P>Example:
  59  * <PRE>
  60  *   int i = org.omg.CORBA.TCKind.tk_char.value();
  61  * </PRE>
  62  * The variable <code>i</code> represents 9, the value for the
  63  * IDL data type <code>char</code>.
  64  * </UL>
  65  * <P>The <code>value</code> field of a <code>TCKind</code> instance
  66  * is the CDR encoding used for a <code>TypeCode</code> object in
  67  * an IIOP message.
  68  */
  69 
  70 public class TCKind {
  71 
  72     /**
  73      * The <code>int</code> constant for a <code>null</code> IDL data type.
  74      */
  75     public static final int _tk_null = 0;


   1 /*
   2  * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any


  35  * <UL>
  36  * <LI>a set of <code>int</code> constants, one for each
  37  * kind of IDL data type.  These <code>int</code> constants
  38  * make it possible to use a <code>switch</code> statement.
  39  * <LI>a set of <code>TCKind</code> constants, one for each
  40  * kind of IDL data type.  The <code>value</code> field for
  41  * each <code>TCKind</code> instance is initialized with
  42  * the <code>int</code> constant that corresponds with
  43  * the IDL data type that the instance represents.
  44  * <LI>the method <code>from_int</code>for converting
  45  * an <code>int</code> to its
  46  * corresponding <code>TCKind</code> instance
  47  * <P>Example:
  48  * <PRE>
  49  *      org.omg.CORBA.TCKind k = org.omg.CORBA.TCKind.from_int(
  50  *                         org.omg.CORBA.TCKind._tk_string);
  51  * </PRE>
  52  * The variable <code>k</code> represents the <code>TCKind</code>
  53  * instance for the IDL type <code>string</code>, which is
  54  * <code>tk_string</code>.
  55  *
  56  * <LI>the method <code>value</code> for accessing the
  57  * <code>_value</code> field of a <code>TCKind</code> constant
  58  * <P>Example:
  59  * <PRE>
  60  *   int i = org.omg.CORBA.TCKind.tk_char.value();
  61  * </PRE>
  62  * The variable <code>i</code> represents 9, the value for the
  63  * IDL data type <code>char</code>.
  64  * </UL>
  65  * <P>The <code>value</code> field of a <code>TCKind</code> instance
  66  * is the CDR encoding used for a <code>TypeCode</code> object in
  67  * an IIOP message.
  68  */
  69 
  70 public class TCKind {
  71 
  72     /**
  73      * The <code>int</code> constant for a <code>null</code> IDL data type.
  74      */
  75     public static final int _tk_null = 0;


< prev index next >