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