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
  23  * questions.
  24  */
  25 
  26 package org.omg.CORBA;
  27 
  28 import org.omg.CORBA.portable.InputStream;
  29 import org.omg.CORBA.portable.OutputStream;
  30 import org.omg.CORBA.portable.Streamable;
  31 import org.omg.CORBA.portable.IDLEntity;
  32 
  33 /**
  34  * Serves as a container for any data that can be
  35  * described in IDL or for any IDL primitive type.
  36  * An <code>Any</code> object is used as a component of a
  37  * <code>NamedValue</code> object, which provides information about
  38  * arguments or return values in requests, and which is used to define
  39  * name/value pairs in <code>Context</code> objects.
  40  <p>
  41  *
  42  * An <code>Any</code> object consists of two parts:
  43  * <OL>
  44  * <LI>a data value
  45  * <LI>a <code>TypeCode</code> object describing the type of the data
  46  * value contained in the <code>Any</code> object.  For example,
  47  * a <code>TypeCode</code> object for an array contains
  48  * a field for the length of the array and a field for
  49  * the type of elements in the array. (Note that in     this case, the
  50  * second field of the <code>TypeCode</code> object is itself a
  51  * <code>TypeCode</code> object.)
  52  * </OL>
  53  *
  54  * <P>
  55  * <a id="anyOps"></a>
  56  * A large part of the <code>Any</code> class consists of pairs of methods
  57  * for inserting values into and extracting values from an
  58  * <code>Any</code> object.
  59  * <P>
  60  * For a given primitive type X, these methods are:
  61  *  <dl>
  62  *      <dt><code><b>void insert_X(X x)</b></code>
  63  *      <dd> This method allows the insertion of
  64  *        an instance <code>x</code> of primitive type <code>X</code>
  65  *    into the <code>value</code> field of the <code>Any</code> object.
  66  *    Note that the method
  67  *    <code>insert_X</code> also resets the <code>Any</code> object's
  68  *    <code>type</code> field if necessary.
  69  *      <dt> <code><b>X extract_X()</b></code>
  70  *      <dd> This method allows the extraction of an instance of
  71  *        type <code>X</code> from the <code>Any</code> object.
  72  *    <BR>
  73  *    <P>
  74  *    This method throws the exception <code>BAD_OPERATION</code> under two conditions:
  75  *    <OL>
  76  *     <LI> the type of the element contained in the <code>Any</code> object is not
  77  *         <code>X</code>
  78  *     <LI> the method <code>extract_X</code> is called before
  79  *     the <code>value</code> field of the <code>Any</code> object
  80  *     has been set
  81  *    </OL>
  82  * </dl>
  83  * <P>
  84  * There are distinct method pairs for each
  85  * primitive IDL data type (<code>insert_long</code> and <code>extract_long</code>,
  86  * <code>insert_string</code> and <code>extract_string</code>, and so on).<BR>
  87  * <P>
  88  * The class <code>Any</code> also has methods for
  89  * getting and setting the type code,
  90  * for testing two <code>Any</code> objects for equality,
  91  * and for reading an <code>Any</code> object from a stream or
  92  * writing it to a stream.
  93  * <BR>
  94  * @since   JDK1.2
  95  */
  96 abstract public class Any implements IDLEntity {
  97 
  98     /**
  99      * Checks for equality between this <code>Any</code> object and the
 100      * given <code>Any</code> object.  Two <code>Any</code> objects are
 101      * equal if both their values and type codes are equal.
 102      *
 103      * @param a the <code>Any</code> object to test for equality
 104      * @return  <code>true</code> if the <code>Any</code> objects are equal;
 105      * <code>false</code> otherwise
 106      * @see <a href="package-summary.html#unimpl"><code>CORBA</code> package
 107      *      comments for unimplemented features</a>
 108      */
 109     abstract public boolean equal(Any a);
 110 
 111     /**
 112      * Returns type information for the element contained in this
 113      * <code>Any</code> object.
 114      *
 115      * @return          the <code>TypeCode</code> object containing type information
 116      *                about the value contained in this <code>Any</code> object
 117      */
 118     abstract public TypeCode type();
 119 
 120     /**
 121      * Sets this <code>Any</code> object's <code>type</code> field
 122      * to the given <code>TypeCode</code> object and clears its value.
 123      * <P>
 124      * Note that using this method to set the type code wipes out the
 125      * value if there is one. The method
 126      * is provided primarily so that the type may be set properly for
 127      * IDL <code>out</code> parameters.  Generally, setting the type
 128      * is done by the <code>insert_X</code> methods, which will set the type
 129      * to X if it is not already set to X.
 130      *
 131      * @param t       the <code>TypeCode</code> object giving
 132      *                information for the value in
 133      *                this <code>Any</code> object
 134      */
 135     abstract public void type(TypeCode t);
 136 
 137     ///////////////////////////////////////////////////////////////////////////
 138     // marshalling/unmarshalling routines
 139 
 140     /**
 141      * Reads off (unmarshals) the value of an <code>Any</code> object from
 142      * the given input stream using the given typecode.
 143      *
 144      * @param is the <code>org.omg.CORBA.portable.InputStream</code>
 145      *                object from which to read
 146      *                the value contained in this <code>Any</code> object
 147      *
 148      * @param t  a <code>TypeCode</code> object containing type information
 149      *           about the value to be read
 150      *
 151      * @exception MARSHAL when the given <code>TypeCode</code> object is
 152      *                    not consistent with the value that was contained
 153      *                    in the input stream
 154      */
 155     abstract public void   read_value(InputStream is, TypeCode t)
 156         throws MARSHAL;
 157 
 158     /**
 159      * Writes out the value of this <code>Any</code> object
 160      * to the given output stream.  If both <code>typecode</code>
 161      * and <code>value</code> need to be written, use
 162      * <code>create_output_stream()</code> to create an <code>OutputStream</code>,
 163      * then use <code>write_any</code> on the <code>OutputStream</code>.
 164      * <P>
 165      * If this method is called on an <code>Any</code> object that has not
 166      * had a value inserted into its <code>value</code> field, it will throw
 167      * the exception <code>java.lang.NullPointerException</code>.
 168      *
 169      * @param os        the <code>org.omg.CORBA.portable.OutputStream</code>
 170      *                object into which to marshal the value
 171      *                of this <code>Any</code> object
 172      *
 173      */
 174     abstract public void   write_value(OutputStream os);
 175 
 176     /**
 177      * Creates an output stream into which this <code>Any</code> object's
 178      * value can be marshalled.
 179      *
 180      * @return          the newly-created <code>OutputStream</code>
 181      */
 182     abstract public OutputStream  create_output_stream();
 183 
 184     /**
 185      * Creates an input stream from which this <code>Any</code> object's value
 186      * can be unmarshalled.
 187      *
 188      * @return          the newly-created <code>InputStream</code>
 189      */
 190     abstract public InputStream  create_input_stream();
 191 
 192     ///////////////////////////////////////////////////////////////////////////
 193     // basic insertion/extraction methods
 194 
 195     /**
 196      * Extracts the <code>short</code> in this
 197      * <code>Any</code> object's <code>value</code> field.
 198      *
 199      * @return the <code>short</code> stored in this <code>Any</code> object
 200      * @exception BAD_OPERATION if this  <code>Any</code> object
 201      *              contains something other than a <code>short</code> or the
 202      *              <code>value</code> field has not yet been set
 203      */
 204     abstract public short    extract_short() throws BAD_OPERATION;
 205 
 206     /**
 207      * Inserts the given <code>short</code>
 208      * into this <code>Any</code> object's <code>value</code> field.
 209      *
 210      * @param s         the <code>short</code> to insert into this
 211      *                <code>Any</code> object
 212      */
 213     abstract public void     insert_short(short s);
 214 
 215     /**
 216      * Extracts the <code>int</code> in this
 217      * <code>Any</code> object's <code>value</code> field.
 218      *
 219      * @return the <code>int</code> stored in this <code>Any</code> object
 220      * @exception BAD_OPERATION if this  <code>Any</code> object
 221      *              contains something other than an <code>int</code> or the
 222      *              <code>value</code> field has not yet been set
 223      */
 224     abstract public int      extract_long() throws BAD_OPERATION;
 225 
 226     /**
 227      * Inserts the given <code>int</code>
 228      * into this <code>Any</code> object's <code>value</code> field.
 229      *
 230      * @param l         the <code>int</code> to insert into this
 231      *                <code>Any</code> object
 232      */
 233     abstract public void     insert_long(int l);
 234 
 235 
 236     /**
 237      * Extracts the <code>long</code> in this
 238      * <code>Any</code> object's <code>value</code> field.
 239      *
 240      * @return the <code>long</code> stored in this <code>Any</code> object
 241      * @exception BAD_OPERATION if this  <code>Any</code> object
 242      *              contains something other than a <code>long</code> or the
 243      *              <code>value</code> field has not yet been set
 244      */
 245     abstract public long     extract_longlong() throws BAD_OPERATION;
 246 
 247     /**
 248      * Inserts the given <code>long</code>
 249      * into this <code>Any</code> object's <code>value</code> field.
 250      *
 251      * @param l         the <code>long</code> to insert into this
 252      *                <code>Any</code> object
 253      */
 254     abstract public void     insert_longlong(long l);
 255 
 256     /**
 257      * Extracts the <code>short</code> in this
 258      * <code>Any</code> object's <code>value</code> field.
 259      *
 260      * @return the <code>short</code> stored in this <code>Any</code> object
 261      * @exception BAD_OPERATION if this  <code>Any</code> object
 262      *              contains something other than a <code>short</code> or the
 263      *              <code>value</code> field has not yet been set
 264      */
 265     abstract public short    extract_ushort() throws BAD_OPERATION;
 266 
 267     /**
 268      * Inserts the given <code>short</code>
 269      * into this <code>Any</code> object's <code>value</code> field.
 270      *
 271      * @param s         the <code>short</code> to insert into this
 272      *                <code>Any</code> object
 273      */
 274     abstract public void     insert_ushort(short s);
 275 
 276     /**
 277      * Extracts the <code>int</code> in this
 278      * <code>Any</code> object's <code>value</code> field.
 279      *
 280      * @return the <code>int</code> stored in this <code>Any</code> object
 281      * @exception BAD_OPERATION if this  <code>Any</code> object
 282      *              contains something other than an <code>int</code> or the
 283      *              <code>value</code> field has not yet been set
 284      */
 285     abstract public int      extract_ulong() throws BAD_OPERATION;
 286 
 287     /**
 288      * Inserts the given <code>int</code>
 289      * into this <code>Any</code> object's <code>value</code> field.
 290      *
 291      * @param l         the <code>int</code> to insert into this
 292      *                <code>Any</code> object
 293      */
 294     abstract public void     insert_ulong(int l);
 295 
 296     /**
 297      * Extracts the <code>long</code> in this
 298      * <code>Any</code> object's <code>value</code> field.
 299      *
 300      * @return the <code>long</code> stored in this <code>Any</code> object
 301      * @exception BAD_OPERATION if this  <code>Any</code> object
 302      *              contains something other than a <code>long</code> or the
 303      *              <code>value</code> field has not yet been set
 304      */
 305     abstract public long     extract_ulonglong() throws BAD_OPERATION;
 306 
 307     /**
 308      * Inserts the given <code>long</code>
 309      * into this <code>Any</code> object's <code>value</code> field.
 310      *
 311      * @param l         the <code>long</code> to insert into this
 312      *                <code>Any</code> object
 313      */
 314     abstract public void     insert_ulonglong(long l);
 315 
 316     /**
 317      * Extracts the <code>float</code> in this
 318      * <code>Any</code> object's <code>value</code> field.
 319      *
 320      * @return the <code>float</code> stored in this <code>Any</code> object
 321      * @exception BAD_OPERATION if this  <code>Any</code> object
 322      *              contains something other than a <code>float</code> or the
 323      *              <code>value</code> field has not yet been set
 324      */
 325     abstract public float    extract_float() throws BAD_OPERATION;
 326 
 327     /**
 328      * Inserts the given <code>float</code>
 329      * into this <code>Any</code> object's <code>value</code> field.
 330      *
 331      * @param f         the <code>float</code> to insert into this
 332      *                <code>Any</code> object
 333      */
 334     abstract public void     insert_float(float f);
 335 
 336     /**
 337      * Extracts the <code>double</code> in this
 338      * <code>Any</code> object's <code>value</code> field.
 339      *
 340      * @return the <code>double</code> stored in this <code>Any</code> object
 341      * @exception BAD_OPERATION if this  <code>Any</code> object
 342      *              contains something other than a <code>double</code> or the
 343      *              <code>value</code> field has not yet been set
 344      */
 345     abstract public double   extract_double() throws BAD_OPERATION;
 346 
 347     /**
 348      * Inserts the given <code>double</code>
 349      * into this <code>Any</code> object's <code>value</code> field.
 350      *
 351      * @param d         the <code>double</code> to insert into this
 352      *                <code>Any</code> object
 353      */
 354     abstract public void     insert_double(double d);
 355 
 356     /**
 357      * Extracts the <code>boolean</code> in this
 358      * <code>Any</code> object's <code>value</code> field.
 359      *
 360      * @return the <code>boolean</code> stored in this <code>Any</code> object
 361      * @exception BAD_OPERATION if this  <code>Any</code> object
 362      *              contains something other than a <code>boolean</code> or the
 363      *              <code>value</code> field has not yet been set
 364      */
 365     abstract public boolean  extract_boolean() throws BAD_OPERATION;
 366 
 367     /**
 368      * Inserts the given <code>boolean</code>
 369      * into this <code>Any</code> object's <code>value</code> field.
 370      *
 371      * @param b         the <code>boolean</code> to insert into this
 372      *                <code>Any</code> object
 373      */
 374     abstract public void     insert_boolean(boolean b);
 375 
 376     /**
 377      * Extracts the <code>char</code> in this
 378      * <code>Any</code> object's <code>value</code> field.
 379      *
 380      * @return the <code>char</code> stored in this <code>Any</code> object
 381      * @exception BAD_OPERATION if this  <code>Any</code> object
 382      *              contains something other than a <code>char</code> or the
 383      *              <code>value</code> field has not yet been set
 384      */
 385     abstract public char     extract_char() throws BAD_OPERATION;
 386 
 387     /**
 388      * Inserts the given <code>char</code>
 389      * into this <code>Any</code> object's <code>value</code> field.
 390      *
 391      * @param c         the <code>char</code> to insert into this
 392      *                <code>Any</code> object
 393      * @exception DATA_CONVERSION if there is a data conversion
 394          *            error
 395      */
 396     abstract public void     insert_char(char c) throws DATA_CONVERSION;
 397 
 398     /**
 399      * Extracts the <code>char</code> in this
 400      * <code>Any</code> object's <code>value</code> field.
 401      *
 402      * @return the <code>char</code> stored in this <code>Any</code> object
 403      * @exception BAD_OPERATION if this  <code>Any</code> object
 404      *              contains something other than a <code>char</code> or the
 405      *              <code>value</code> field has not yet been set
 406      */
 407     abstract public char     extract_wchar() throws BAD_OPERATION;
 408 
 409     /**
 410      * Inserts the given <code>char</code>
 411      * into this <code>Any</code> object's <code>value</code> field.
 412      *
 413      * @param c         the <code>char</code> to insert into this
 414      *                <code>Any</code> object
 415      */
 416     abstract public void     insert_wchar(char c);
 417 
 418     /**
 419      * Extracts the <code>byte</code> in this
 420      * <code>Any</code> object's <code>value</code> field.
 421      *
 422      * @return the <code>byte</code> stored in this <code>Any</code> object
 423      * @exception BAD_OPERATION if this  <code>Any</code> object
 424      *              contains something other than a <code>byte</code> or the
 425      *              <code>value</code> field has not yet been set
 426      */
 427     abstract public byte     extract_octet() throws BAD_OPERATION;
 428 
 429     /**
 430      * Inserts the given <code>byte</code>
 431      * into this <code>Any</code> object's <code>value</code> field.
 432      *
 433      * @param b         the <code>byte</code> to insert into this
 434      *                <code>Any</code> object
 435      */
 436     abstract public void     insert_octet(byte b);
 437 
 438     /**
 439      * Extracts the <code>Any</code> object in this
 440      * <code>Any</code> object's <code>value</code> field.
 441      *
 442      * @return the <code>Any</code> object stored in this <code>Any</code> object
 443      * @exception BAD_OPERATION if this <code>Any</code> object
 444      *              contains something other than an <code>Any</code> object or the
 445      *              <code>value</code> field has not yet been set
 446      */
 447     abstract public Any      extract_any() throws BAD_OPERATION;
 448 
 449     /**
 450      * Inserts the given <code>Any</code> object
 451      * into this <code>Any</code> object's <code>value</code> field.
 452      *
 453      * @param a         the <code>Any</code> object to insert into this
 454      *                <code>Any</code> object
 455      */
 456     abstract public void     insert_any(Any a);
 457 
 458     /**
 459      * Extracts the <code>org.omg.CORBA.Object</code> in this
 460      * <code>Any</code> object's <code>value</code> field.
 461      *
 462      * @return the <code>org.omg.CORBA.Object</code> stored in
 463      *         this <code>Any</code> object
 464      * @exception BAD_OPERATION if this  <code>Any</code> object
 465      *              contains something other than an
 466      *              <code>org.omg.CORBA.Object</code> or the
 467      *              <code>value</code> field has not yet been set
 468      */
 469     abstract public org.omg.CORBA.Object extract_Object() throws BAD_OPERATION;
 470 
 471     /**
 472      * Inserts the given <code>org.omg.CORBA.Object</code> object
 473      * into this <code>Any</code> object's <code>value</code> field.
 474      *
 475      * @param o         the <code>org.omg.CORBA.Object</code> object to insert into this
 476      *                <code>Any</code> object
 477      */
 478     abstract public void insert_Object(org.omg.CORBA.Object o);
 479 
 480     /**
 481      * Extracts the <code>java.io.Serializable</code> object in this
 482      * <code>Any</code> object's <code>value</code> field.
 483      *
 484      * @return the <code>java.io.Serializable</code> object stored in
 485      *         this <code>Any</code> object
 486      * @exception BAD_OPERATION if this  <code>Any</code> object
 487      *              contains something other than a <code>java.io.Serializable</code>
 488      *              object or the
 489      *              <code>value</code> field has not yet been set
 490      */
 491     abstract public java.io.Serializable extract_Value() throws BAD_OPERATION ;
 492 
 493     /**
 494      * Inserts the given <code>java.io.Serializable</code> object
 495      * into this <code>Any</code> object's <code>value</code> field.
 496      *
 497      * @param v         the <code>java.io.Serializable</code> object to insert into this
 498      *                <code>Any</code> object
 499      */
 500     abstract public void insert_Value(java.io.Serializable v) ;
 501 
 502     /**
 503      * Inserts the given <code>java.io.Serializable</code> object
 504      * into this <code>Any</code> object's <code>value</code> field.
 505      *
 506      * @param v         the <code>java.io.Serializable</code> object to insert into this
 507      *                <code>Any</code> object
 508      * @param t     the <code>TypeCode</code> object that is to be inserted into
 509      *              this <code>Any</code> object's <code>type</code> field
 510      *              and that describes the <code>java.io.Serializable</code>
 511      *              object being inserted
 512          * @throws MARSHAL if the ORB has a problem marshalling or
 513          *          unmarshalling parameters
 514      */
 515     abstract public void insert_Value(java.io.Serializable v, TypeCode t)
 516         throws MARSHAL ;
 517 /**
 518      * Inserts the given <code>org.omg.CORBA.Object</code> object
 519      * into this <code>Any</code> object's <code>value</code> field.
 520      *
 521      * @param o         the <code>org.omg.CORBA.Object</code> instance to insert into this
 522      *                <code>Any</code> object
 523      * @param t     the <code>TypeCode</code> object that is to be inserted into
 524      *              this <code>Any</code> object and that describes
 525      *              the <code>Object</code> being inserted
 526      * @exception BAD_OPERATION if this  method is invalid for this
 527          *            <code>Any</code> object
 528      *
 529      */
 530     abstract public void insert_Object(org.omg.CORBA.Object o, TypeCode t)
 531         throws BAD_PARAM;
 532 
 533     /**
 534      * Extracts the <code>String</code> object in this
 535      * <code>Any</code> object's <code>value</code> field.
 536      *
 537      * @return the <code>String</code> object stored in this <code>Any</code> object
 538      * @exception BAD_OPERATION if this  <code>Any</code> object
 539      *              contains something other than a <code>String</code> object or the
 540      *              <code>value</code> field has not yet been set
 541      */
 542     abstract public String   extract_string() throws BAD_OPERATION;
 543 
 544     /**
 545      * Inserts the given <code>String</code> object
 546      * into this <code>Any</code> object's <code>value</code> field.
 547      *
 548      * @param s         the <code>String</code> object to insert into this
 549      *                <code>Any</code> object
 550      * @exception DATA_CONVERSION if there is a data conversion error
 551      * @exception MARSHAL if the ORB has a problem marshalling or
 552          *             unmarshalling parameters
 553      */
 554     abstract public void     insert_string(String s) throws DATA_CONVERSION, MARSHAL;
 555 
 556     /**
 557      * Extracts the <code>String</code> object in this
 558      * <code>Any</code> object's <code>value</code> field.
 559      *
 560      * @return the <code>String</code> object stored in this <code>Any</code> object
 561      * @exception BAD_OPERATION if this  <code>Any</code> object
 562      *              contains something other than a <code>String</code> object or the
 563      *              <code>value</code> field has not yet been set
 564      */
 565     abstract public String   extract_wstring() throws BAD_OPERATION;
 566 
 567     /**
 568      * Inserts the given <code>String</code> object
 569      * into this <code>Any</code> object's <code>value</code> field.
 570      *
 571      * @param s         the <code>String</code> object to insert into this
 572      *                <code>Any</code> object
 573      * @exception MARSHAL if the ORB has a problem marshalling or
 574          *             unmarshalling parameters
 575      */
 576     abstract public void     insert_wstring(String s) throws MARSHAL;
 577 
 578     /**
 579      * Extracts the <code>TypeCode</code> object in this
 580      * <code>Any</code> object's <code>value</code> field.
 581      *
 582      * @return the <code>TypeCode</code> object stored in this <code>Any</code> object
 583      * @exception BAD_OPERATION if this  <code>Any</code> object
 584      *              contains something other than a <code>TypeCode</code> object or the
 585      *              <code>value</code> field has not yet been set
 586      */
 587     abstract public TypeCode extract_TypeCode() throws BAD_OPERATION;
 588 
 589     /**
 590      * Inserts the given <code>TypeCode</code> object
 591      * into this <code>Any</code> object's <code>value</code> field.
 592      *
 593      * @param t         the <code>TypeCode</code> object to insert into this
 594      *                <code>Any</code> object
 595      */
 596     abstract public void           insert_TypeCode(TypeCode t);
 597 
 598     /**
 599      * Extracts the <code>Principal</code> object in this
 600      * <code>Any</code> object's <code>value</code> field.
 601      * Note that the class <code>Principal</code> has been deprecated.
 602      *
 603      * @return the <code>Principal</code> object stored in this <code>Any</code> object
 604      * @exception BAD_OPERATION if this  <code>Any</code> object
 605      *              contains something other than a
 606      *              <code>Principal</code> object or the
 607      *              <code>value</code> field has not yet been set
 608      * @see <a href="package-summary.html#unimpl"><code>CORBA</code> package
 609      *      comments for unimplemented features</a>
 610      * @deprecated Deprecated by CORBA 2.2.
 611      */
 612     @Deprecated
 613     public Principal extract_Principal() throws BAD_OPERATION {
 614         throw new org.omg.CORBA.NO_IMPLEMENT() ;
 615     }
 616 
 617     /**
 618      * Inserts the given <code>Principal</code> object
 619      * into this <code>Any</code> object's <code>value</code> field.
 620      * Note that the class <code>Principal</code> has been deprecated.
 621      *
 622      * @param p         the <code>Principal</code> object to insert into this
 623      *                <code>Any</code> object
 624      * @see <a href="package-summary.html#unimpl"><code>CORBA</code> package
 625      *      comments for unimplemented features</a>
 626      * @deprecated Deprecated by CORBA 2.2.
 627      */
 628     @Deprecated
 629     public void    insert_Principal(Principal p) {
 630         throw new org.omg.CORBA.NO_IMPLEMENT() ;
 631     }
 632 
 633     ///////////////////////////////////////////////////////////////////////////
 634     // insertion/extraction of streamables
 635 
 636     /**
 637      * Extracts a <code>Streamable</code> from this <code>Any</code> object's
 638      * <code>value</code> field.  This method allows the extraction of
 639      * non-primitive IDL types.
 640      *
 641      * @return the <code>Streamable</code> stored in the <code>Any</code> object.
 642      * @throws BAD_INV_ORDER if the caller has invoked operations in the wrong order
 643      * @see <a href="package-summary.html#unimpl"><code>CORBA</code> package
 644      *      comments for unimplemented features</a>
 645      */
 646     public org.omg.CORBA.portable.Streamable extract_Streamable()
 647         throws org.omg.CORBA.BAD_INV_ORDER {
 648         throw new org.omg.CORBA.NO_IMPLEMENT() ;
 649     }
 650 
 651     /**
 652      * Inserts the given <code>Streamable</code> object
 653      * into this <code>Any</code> object's <code>value</code> field.
 654      * This method allows the insertion of non-primitive IDL types.
 655      *
 656      * @param s         the <code>Streamable</code> object to insert into this
 657      *                <code>Any</code> object; may be a non-primitive
 658      *                IDL type
 659      * @see <a href="package-summary.html#unimpl"><code>CORBA</code> package
 660      *      comments for unimplemented features</a>
 661      */
 662     public void insert_Streamable(Streamable s) {
 663         throw new org.omg.CORBA.NO_IMPLEMENT() ;
 664     }
 665 
 666     /**
 667      * Extracts the <code>java.math.BigDecimal</code> object in this
 668      * <code>Any</code> object's <code>value</code> field.
 669      *
 670      * @return the <code>java.math.BigDecimal</code> object
 671      *         stored in this <code>Any</code> object
 672      * @exception BAD_OPERATION if this  <code>Any</code> object
 673      *              contains something other than a
 674      *              <code>java.math.BigDecimal</code> object or the
 675      *              <code>value</code> field has not yet been set
 676      * @see <a href="package-summary.html#unimpl"><code>CORBA</code> package
 677      *      comments for unimplemented features</a>
 678      */
 679     public java.math.BigDecimal extract_fixed() {
 680         throw new org.omg.CORBA.NO_IMPLEMENT();
 681     }
 682 
 683     /**
 684      * Throws an <a href="package-summary.html#NO_IMPLEMENT">
 685      * <code>org.omg.CORBA.NO_IMPLEMENT</code></a> exception.
 686      * <P>
 687      * Inserts the given <code>java.math.BigDecimal</code> object
 688      * into this <code>Any</code> object's <code>value</code> field.
 689      *
 690      * @param value             the <code>java.math.BigDecimal</code> object
 691      *                  to insert into this <code>Any</code> object
 692      * @see <a href="package-summary.html#unimpl"><code>CORBA</code> package
 693      *      comments for unimplemented features</a>
 694      */
 695     public void insert_fixed(java.math.BigDecimal value) {
 696         throw new org.omg.CORBA.NO_IMPLEMENT();
 697     }
 698 
 699     /**
 700      * Throws an <a href="package-summary.html#NO_IMPLEMENT">
 701      * <code>org.omg.CORBA.NO_IMPLEMENT</code></a> exception.
 702      * <P>
 703      * Inserts the given <code>java.math.BigDecimal</code> object
 704      * into this <code>Any</code> object's <code>value</code> field.
 705      *
 706      * @param value             the <code>java.math.BigDecimal</code> object
 707      *                  to insert into this <code>Any</code> object
 708      * @param type     the <code>TypeCode</code> object that is to be inserted into
 709      *              this <code>Any</code> object's <code>type</code> field
 710      *              and that describes the <code>java.math.BigDecimal</code>
 711      *              object being inserted
 712      * @throws org.omg.CORBA.BAD_INV_ORDER if this method is  invoked improperly
 713      * @see <a href="package-summary.html#unimpl"><code>CORBA</code> package
 714      *      comments for unimplemented features</a>
 715      */
 716     public void insert_fixed(java.math.BigDecimal value, org.omg.CORBA.TypeCode type)
 717         throws org.omg.CORBA.BAD_INV_ORDER
 718     {
 719         throw new org.omg.CORBA.NO_IMPLEMENT();
 720     }
 721 }