1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/src/share/classes/org/omg/CORBA/Any.java Wed Apr 27 01:21:28 2016 +0800 1.3 @@ -0,0 +1,721 @@ 1.4 +/* 1.5 + * Copyright (c) 1997, 2004, Oracle and/or its affiliates. All rights reserved. 1.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1.7 + * 1.8 + * This code is free software; you can redistribute it and/or modify it 1.9 + * under the terms of the GNU General Public License version 2 only, as 1.10 + * published by the Free Software Foundation. Oracle designates this 1.11 + * particular file as subject to the "Classpath" exception as provided 1.12 + * by Oracle in the LICENSE file that accompanied this code. 1.13 + * 1.14 + * This code is distributed in the hope that it will be useful, but WITHOUT 1.15 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 1.16 + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 1.17 + * version 2 for more details (a copy is included in the LICENSE file that 1.18 + * accompanied this code). 1.19 + * 1.20 + * You should have received a copy of the GNU General Public License version 1.21 + * 2 along with this work; if not, write to the Free Software Foundation, 1.22 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 1.23 + * 1.24 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 1.25 + * or visit www.oracle.com if you need additional information or have any 1.26 + * questions. 1.27 + */ 1.28 + 1.29 +package org.omg.CORBA; 1.30 + 1.31 +import org.omg.CORBA.portable.InputStream; 1.32 +import org.omg.CORBA.portable.OutputStream; 1.33 +import org.omg.CORBA.portable.Streamable; 1.34 +import org.omg.CORBA.portable.IDLEntity; 1.35 + 1.36 +/** 1.37 + * Serves as a container for any data that can be 1.38 + * described in IDL or for any IDL primitive type. 1.39 + * An <code>Any</code> object is used as a component of a 1.40 + * <code>NamedValue</code> object, which provides information about 1.41 + * arguments or return values in requests, and which is used to define 1.42 + * name/value pairs in <code>Context</code> objects. 1.43 + <p> 1.44 + * 1.45 + * An <code>Any</code> object consists of two parts: 1.46 + * <OL> 1.47 + * <LI>a data value 1.48 + * <LI>a <code>TypeCode</code> object describing the type of the data 1.49 + * value contained in the <code>Any</code> object. For example, 1.50 + * a <code>TypeCode</code> object for an array contains 1.51 + * a field for the length of the array and a field for 1.52 + * the type of elements in the array. (Note that in this case, the 1.53 + * second field of the <code>TypeCode</code> object is itself a 1.54 + * <code>TypeCode</code> object.) 1.55 + * </OL> 1.56 + * 1.57 + * <P> 1.58 + * <a name="anyOps"</a> 1.59 + * A large part of the <code>Any</code> class consists of pairs of methods 1.60 + * for inserting values into and extracting values from an 1.61 + * <code>Any</code> object. 1.62 + * <P> 1.63 + * For a given primitive type X, these methods are: 1.64 + * <dl> 1.65 + * <dt><code><bold> void insert_X(X x)</bold></code> 1.66 + * <dd> This method allows the insertion of 1.67 + * an instance <code>x</code> of primitive type <code>X</code> 1.68 + * into the <code>value</code> field of the <code>Any</code> object. 1.69 + * Note that the method 1.70 + * <code>insert_X</code> also resets the <code>Any</code> object's 1.71 + * <code>type</code> field if necessary. 1.72 + * <dt> <code><bold>X extract_X()</bold></code> 1.73 + * <dd> This method allows the extraction of an instance of 1.74 + * type <code>X</code> from the <code>Any</code> object. 1.75 + * <BR> 1.76 + * <P> 1.77 + * This method throws the exception <code>BAD_OPERATION</code> under two conditions: 1.78 + * <OL> 1.79 + * <LI> the type of the element contained in the <code>Any</code> object is not 1.80 + * <code>X</code> 1.81 + * <LI> the method <code>extract_X</code> is called before 1.82 + * the <code>value</code> field of the <code>Any</code> object 1.83 + * has been set 1.84 + * </OL> 1.85 + * </dl> 1.86 + * <P> 1.87 + * There are distinct method pairs for each 1.88 + * primitive IDL data type (<code>insert_long</code> and <code>extract_long</code>, 1.89 + * <code>insert_string</code> and <code>extract_string</code>, and so on).<BR> 1.90 + * <P> 1.91 + * The class <code>Any</code> also has methods for 1.92 + * getting and setting the type code, 1.93 + * for testing two <code>Any</code> objects for equality, 1.94 + * and for reading an <code>Any</code> object from a stream or 1.95 + * writing it to a stream. 1.96 + * <BR> 1.97 + * @since JDK1.2 1.98 + */ 1.99 +abstract public class Any implements IDLEntity { 1.100 + 1.101 + /** 1.102 + * Checks for equality between this <code>Any</code> object and the 1.103 + * given <code>Any</code> object. Two <code>Any</code> objects are 1.104 + * equal if both their values and type codes are equal. 1.105 + * 1.106 + * @param a the <code>Any</code> object to test for equality 1.107 + * @return <code>true</code> if the <code>Any</code> objects are equal; 1.108 + * <code>false</code> otherwise 1.109 + * @see <a href="package-summary.html#unimpl"><code>CORBA</code> package 1.110 + * comments for unimplemented features</a> 1.111 + */ 1.112 + abstract public boolean equal(Any a); 1.113 + 1.114 + /** 1.115 + * Returns type information for the element contained in this 1.116 + * <code>Any</code> object. 1.117 + * 1.118 + * @return the <code>TypeCode</code> object containing type information 1.119 + * about the value contained in this <code>Any</code> object 1.120 + */ 1.121 + abstract public TypeCode type(); 1.122 + 1.123 + /** 1.124 + * Sets this <code>Any</code> object's <code>type</code> field 1.125 + * to the given <code>TypeCode</code> object and clears its value. 1.126 + * <P> 1.127 + * Note that using this method to set the type code wipes out the 1.128 + * value if there is one. The method 1.129 + * is provided primarily so that the type may be set properly for 1.130 + * IDL <code>out</code> parameters. Generally, setting the type 1.131 + * is done by the <code>insert_X</code> methods, which will set the type 1.132 + * to X if it is not already set to X. 1.133 + * 1.134 + * @param t the <code>TypeCode</code> object giving 1.135 + * information for the value in 1.136 + * this <code>Any</code> object 1.137 + */ 1.138 + abstract public void type(TypeCode t); 1.139 + 1.140 + /////////////////////////////////////////////////////////////////////////// 1.141 + // marshalling/unmarshalling routines 1.142 + 1.143 + /** 1.144 + * Reads off (unmarshals) the value of an <code>Any</code> object from 1.145 + * the given input stream using the given typecode. 1.146 + * 1.147 + * @param is the <code>org.omg.CORBA.portable.InputStream</code> 1.148 + * object from which to read 1.149 + * the value contained in this <code>Any</code> object 1.150 + * 1.151 + * @param t a <code>TypeCode</code> object containing type information 1.152 + * about the value to be read 1.153 + * 1.154 + * @exception MARSHAL when the given <code>TypeCode</code> object is 1.155 + * not consistent with the value that was contained 1.156 + * in the input stream 1.157 + */ 1.158 + abstract public void read_value(InputStream is, TypeCode t) 1.159 + throws MARSHAL; 1.160 + 1.161 + /** 1.162 + * Writes out the value of this <code>Any</code> object 1.163 + * to the given output stream. If both <code>typecode</code> 1.164 + * and <code>value</code> need to be written, use 1.165 + * <code>create_output_stream()</code> to create an <code>OutputStream</code>, 1.166 + * then use <code>write_any</code> on the <code>OutputStream</code>. 1.167 + * <P> 1.168 + * If this method is called on an <code>Any</code> object that has not 1.169 + * had a value inserted into its <code>value</code> field, it will throw 1.170 + * the exception <code>java.lang.NullPointerException</code>. 1.171 + * 1.172 + * @param os the <code>org.omg.CORBA.portable.OutputStream</code> 1.173 + * object into which to marshal the value 1.174 + * of this <code>Any</code> object 1.175 + * 1.176 + */ 1.177 + abstract public void write_value(OutputStream os); 1.178 + 1.179 + /** 1.180 + * Creates an output stream into which this <code>Any</code> object's 1.181 + * value can be marshalled. 1.182 + * 1.183 + * @return the newly-created <code>OutputStream</code> 1.184 + */ 1.185 + abstract public OutputStream create_output_stream(); 1.186 + 1.187 + /** 1.188 + * Creates an input stream from which this <code>Any</code> object's value 1.189 + * can be unmarshalled. 1.190 + * 1.191 + * @return the newly-created <code>InputStream</code> 1.192 + */ 1.193 + abstract public InputStream create_input_stream(); 1.194 + 1.195 + /////////////////////////////////////////////////////////////////////////// 1.196 + // basic insertion/extraction methods 1.197 + 1.198 + /** 1.199 + * Extracts the <code>short</code> in this 1.200 + * <code>Any</code> object's <code>value</code> field. 1.201 + * 1.202 + * @return the <code>short</code> stored in this <code>Any</code> object 1.203 + * @exception BAD_OPERATION if this <code>Any</code> object 1.204 + * contains something other than a <code>short</code> or the 1.205 + * <code>value</code> field has not yet been set 1.206 + */ 1.207 + abstract public short extract_short() throws BAD_OPERATION; 1.208 + 1.209 + /** 1.210 + * Inserts the given <code>short</code> 1.211 + * into this <code>Any</code> object's <code>value</code> field. 1.212 + * 1.213 + * @param s the <code>short</code> to insert into this 1.214 + * <code>Any</code> object 1.215 + */ 1.216 + abstract public void insert_short(short s); 1.217 + 1.218 + /** 1.219 + * Extracts the <code>int</code> in this 1.220 + * <code>Any</code> object's <code>value</code> field. 1.221 + * 1.222 + * @return the <code>int</code> stored in this <code>Any</code> object 1.223 + * @exception BAD_OPERATION if this <code>Any</code> object 1.224 + * contains something other than an <code>int</code> or the 1.225 + * <code>value</code> field has not yet been set 1.226 + */ 1.227 + abstract public int extract_long() throws BAD_OPERATION; 1.228 + 1.229 + /** 1.230 + * Inserts the given <code>int</code> 1.231 + * into this <code>Any</code> object's <code>value</code> field. 1.232 + * 1.233 + * @param l the <code>int</code> to insert into this 1.234 + * <code>Any</code> object 1.235 + */ 1.236 + abstract public void insert_long(int l); 1.237 + 1.238 + 1.239 + /** 1.240 + * Extracts the <code>long</code> in this 1.241 + * <code>Any</code> object's <code>value</code> field. 1.242 + * 1.243 + * @return the <code>long</code> stored in this <code>Any</code> object 1.244 + * @exception BAD_OPERATION if this <code>Any</code> object 1.245 + * contains something other than a <code>long</code> or the 1.246 + * <code>value</code> field has not yet been set 1.247 + */ 1.248 + abstract public long extract_longlong() throws BAD_OPERATION; 1.249 + 1.250 + /** 1.251 + * Inserts the given <code>long</code> 1.252 + * into this <code>Any</code> object's <code>value</code> field. 1.253 + * 1.254 + * @param l the <code>long</code> to insert into this 1.255 + * <code>Any</code> object 1.256 + */ 1.257 + abstract public void insert_longlong(long l); 1.258 + 1.259 + /** 1.260 + * Extracts the <code>short</code> in this 1.261 + * <code>Any</code> object's <code>value</code> field. 1.262 + * 1.263 + * @return the <code>short</code> stored in this <code>Any</code> object 1.264 + * @exception BAD_OPERATION if this <code>Any</code> object 1.265 + * contains something other than a <code>short</code> or the 1.266 + * <code>value</code> field has not yet been set 1.267 + */ 1.268 + abstract public short extract_ushort() throws BAD_OPERATION; 1.269 + 1.270 + /** 1.271 + * Inserts the given <code>short</code> 1.272 + * into this <code>Any</code> object's <code>value</code> field. 1.273 + * 1.274 + * @param s the <code>short</code> to insert into this 1.275 + * <code>Any</code> object 1.276 + */ 1.277 + abstract public void insert_ushort(short s); 1.278 + 1.279 + /** 1.280 + * Extracts the <code>int</code> in this 1.281 + * <code>Any</code> object's <code>value</code> field. 1.282 + * 1.283 + * @return the <code>int</code> stored in this <code>Any</code> object 1.284 + * @exception BAD_OPERATION if this <code>Any</code> object 1.285 + * contains something other than an <code>int</code> or the 1.286 + * <code>value</code> field has not yet been set 1.287 + */ 1.288 + abstract public int extract_ulong() throws BAD_OPERATION; 1.289 + 1.290 + /** 1.291 + * Inserts the given <code>int</code> 1.292 + * into this <code>Any</code> object's <code>value</code> field. 1.293 + * 1.294 + * @param l the <code>int</code> to insert into this 1.295 + * <code>Any</code> object 1.296 + */ 1.297 + abstract public void insert_ulong(int l); 1.298 + 1.299 + /** 1.300 + * Extracts the <code>long</code> in this 1.301 + * <code>Any</code> object's <code>value</code> field. 1.302 + * 1.303 + * @return the <code>long</code> stored in this <code>Any</code> object 1.304 + * @exception BAD_OPERATION if this <code>Any</code> object 1.305 + * contains something other than a <code>long</code> or the 1.306 + * <code>value</code> field has not yet been set 1.307 + */ 1.308 + abstract public long extract_ulonglong() throws BAD_OPERATION; 1.309 + 1.310 + /** 1.311 + * Inserts the given <code>long</code> 1.312 + * into this <code>Any</code> object's <code>value</code> field. 1.313 + * 1.314 + * @param l the <code>long</code> to insert into this 1.315 + * <code>Any</code> object 1.316 + */ 1.317 + abstract public void insert_ulonglong(long l); 1.318 + 1.319 + /** 1.320 + * Extracts the <code>float</code> in this 1.321 + * <code>Any</code> object's <code>value</code> field. 1.322 + * 1.323 + * @return the <code>float</code> stored in this <code>Any</code> object 1.324 + * @exception BAD_OPERATION if this <code>Any</code> object 1.325 + * contains something other than a <code>float</code> or the 1.326 + * <code>value</code> field has not yet been set 1.327 + */ 1.328 + abstract public float extract_float() throws BAD_OPERATION; 1.329 + 1.330 + /** 1.331 + * Inserts the given <code>float</code> 1.332 + * into this <code>Any</code> object's <code>value</code> field. 1.333 + * 1.334 + * @param f the <code>float</code> to insert into this 1.335 + * <code>Any</code> object 1.336 + */ 1.337 + abstract public void insert_float(float f); 1.338 + 1.339 + /** 1.340 + * Extracts the <code>double</code> in this 1.341 + * <code>Any</code> object's <code>value</code> field. 1.342 + * 1.343 + * @return the <code>double</code> stored in this <code>Any</code> object 1.344 + * @exception BAD_OPERATION if this <code>Any</code> object 1.345 + * contains something other than a <code>double</code> or the 1.346 + * <code>value</code> field has not yet been set 1.347 + */ 1.348 + abstract public double extract_double() throws BAD_OPERATION; 1.349 + 1.350 + /** 1.351 + * Inserts the given <code>double</code> 1.352 + * into this <code>Any</code> object's <code>value</code> field. 1.353 + * 1.354 + * @param d the <code>double</code> to insert into this 1.355 + * <code>Any</code> object 1.356 + */ 1.357 + abstract public void insert_double(double d); 1.358 + 1.359 + /** 1.360 + * Extracts the <code>boolean</code> in this 1.361 + * <code>Any</code> object's <code>value</code> field. 1.362 + * 1.363 + * @return the <code>boolean</code> stored in this <code>Any</code> object 1.364 + * @exception BAD_OPERATION if this <code>Any</code> object 1.365 + * contains something other than a <code>boolean</code> or the 1.366 + * <code>value</code> field has not yet been set 1.367 + */ 1.368 + abstract public boolean extract_boolean() throws BAD_OPERATION; 1.369 + 1.370 + /** 1.371 + * Inserts the given <code>boolean</code> 1.372 + * into this <code>Any</code> object's <code>value</code> field. 1.373 + * 1.374 + * @param b the <code>boolean</code> to insert into this 1.375 + * <code>Any</code> object 1.376 + */ 1.377 + abstract public void insert_boolean(boolean b); 1.378 + 1.379 + /** 1.380 + * Extracts the <code>char</code> in this 1.381 + * <code>Any</code> object's <code>value</code> field. 1.382 + * 1.383 + * @return the <code>char</code> stored in this <code>Any</code> object 1.384 + * @exception BAD_OPERATION if this <code>Any</code> object 1.385 + * contains something other than a <code>char</code> or the 1.386 + * <code>value</code> field has not yet been set 1.387 + */ 1.388 + abstract public char extract_char() throws BAD_OPERATION; 1.389 + 1.390 + /** 1.391 + * Inserts the given <code>char</code> 1.392 + * into this <code>Any</code> object's <code>value</code> field. 1.393 + * 1.394 + * @param c the <code>char</code> to insert into this 1.395 + * <code>Any</code> object 1.396 + * @exception DATA_CONVERSION if there is a data conversion 1.397 + * error 1.398 + */ 1.399 + abstract public void insert_char(char c) throws DATA_CONVERSION; 1.400 + 1.401 + /** 1.402 + * Extracts the <code>char</code> in this 1.403 + * <code>Any</code> object's <code>value</code> field. 1.404 + * 1.405 + * @return the <code>char</code> stored in this <code>Any</code> object 1.406 + * @exception BAD_OPERATION if this <code>Any</code> object 1.407 + * contains something other than a <code>char</code> or the 1.408 + * <code>value</code> field has not yet been set 1.409 + */ 1.410 + abstract public char extract_wchar() throws BAD_OPERATION; 1.411 + 1.412 + /** 1.413 + * Inserts the given <code>char</code> 1.414 + * into this <code>Any</code> object's <code>value</code> field. 1.415 + * 1.416 + * @param c the <code>char</code> to insert into this 1.417 + * <code>Any</code> object 1.418 + */ 1.419 + abstract public void insert_wchar(char c); 1.420 + 1.421 + /** 1.422 + * Extracts the <code>byte</code> in this 1.423 + * <code>Any</code> object's <code>value</code> field. 1.424 + * 1.425 + * @return the <code>byte</code> stored in this <code>Any</code> object 1.426 + * @exception BAD_OPERATION if this <code>Any</code> object 1.427 + * contains something other than a <code>byte</code> or the 1.428 + * <code>value</code> field has not yet been set 1.429 + */ 1.430 + abstract public byte extract_octet() throws BAD_OPERATION; 1.431 + 1.432 + /** 1.433 + * Inserts the given <code>byte</code> 1.434 + * into this <code>Any</code> object's <code>value</code> field. 1.435 + * 1.436 + * @param b the <code>byte</code> to insert into this 1.437 + * <code>Any</code> object 1.438 + */ 1.439 + abstract public void insert_octet(byte b); 1.440 + 1.441 + /** 1.442 + * Extracts the <code>Any</code> object in this 1.443 + * <code>Any</code> object's <code>value</code> field. 1.444 + * 1.445 + * @return the <code>Any</code> object stored in this <code>Any</code> object 1.446 + * @exception BAD_OPERATION if this <code>Any</code> object 1.447 + * contains something other than an <code>Any</code> object or the 1.448 + * <code>value</code> field has not yet been set 1.449 + */ 1.450 + abstract public Any extract_any() throws BAD_OPERATION; 1.451 + 1.452 + /** 1.453 + * Inserts the given <code>Any</code> object 1.454 + * into this <code>Any</code> object's <code>value</code> field. 1.455 + * 1.456 + * @param a the <code>Any</code> object to insert into this 1.457 + * <code>Any</code> object 1.458 + */ 1.459 + abstract public void insert_any(Any a); 1.460 + 1.461 + /** 1.462 + * Extracts the <code>org.omg.CORBA.Object</code> in this 1.463 + * <code>Any</code> object's <code>value</code> field. 1.464 + * 1.465 + * @return the <code>org.omg.CORBA.Object</code> stored in 1.466 + * this <code>Any</code> object 1.467 + * @exception BAD_OPERATION if this <code>Any</code> object 1.468 + * contains something other than an 1.469 + * <code>org.omg.CORBA.Object</code> or the 1.470 + * <code>value</code> field has not yet been set 1.471 + */ 1.472 + abstract public org.omg.CORBA.Object extract_Object() throws BAD_OPERATION; 1.473 + 1.474 + /** 1.475 + * Inserts the given <code>org.omg.CORBA.Object</code> object 1.476 + * into this <code>Any</code> object's <code>value</code> field. 1.477 + * 1.478 + * @param o the <code>org.omg.CORBA.Object</code> object to insert into this 1.479 + * <code>Any</code> object 1.480 + */ 1.481 + abstract public void insert_Object(org.omg.CORBA.Object o); 1.482 + 1.483 + /** 1.484 + * Extracts the <code>java.io.Serializable</code> object in this 1.485 + * <code>Any</code> object's <code>value</code> field. 1.486 + * 1.487 + * @return the <code>java.io.Serializable</code> object stored in 1.488 + * this <code>Any</code> object 1.489 + * @exception BAD_OPERATION if this <code>Any</code> object 1.490 + * contains something other than a <code>java.io.Serializable</code> 1.491 + * object or the 1.492 + * <code>value</code> field has not yet been set 1.493 + */ 1.494 + abstract public java.io.Serializable extract_Value() throws BAD_OPERATION ; 1.495 + 1.496 + /** 1.497 + * Inserts the given <code>java.io.Serializable</code> object 1.498 + * into this <code>Any</code> object's <code>value</code> field. 1.499 + * 1.500 + * @param v the <code>java.io.Serializable</code> object to insert into this 1.501 + * <code>Any</code> object 1.502 + */ 1.503 + abstract public void insert_Value(java.io.Serializable v) ; 1.504 + 1.505 + /** 1.506 + * Inserts the given <code>java.io.Serializable</code> object 1.507 + * into this <code>Any</code> object's <code>value</code> field. 1.508 + * 1.509 + * @param v the <code>java.io.Serializable</code> object to insert into this 1.510 + * <code>Any</code> object 1.511 + * @param t the <code>TypeCode</code> object that is to be inserted into 1.512 + * this <code>Any</code> object's <code>type</code> field 1.513 + * and that describes the <code>java.io.Serializable</code> 1.514 + * object being inserted 1.515 + * @throws MARSHAL if the ORB has a problem marshalling or 1.516 + * unmarshalling parameters 1.517 + */ 1.518 + abstract public void insert_Value(java.io.Serializable v, TypeCode t) 1.519 + throws MARSHAL ; 1.520 +/** 1.521 + * Inserts the given <code>org.omg.CORBA.Object</code> object 1.522 + * into this <code>Any</code> object's <code>value</code> field. 1.523 + * 1.524 + * @param o the <code>org.omg.CORBA.Object</code> instance to insert into this 1.525 + * <code>Any</code> object 1.526 + * @param t the <code>TypeCode</code> object that is to be inserted into 1.527 + * this <code>Any</code> object and that describes 1.528 + * the <code>Object</code> being inserted 1.529 + * @exception BAD_OPERATION if this method is invalid for this 1.530 + * <code>Any</code> object 1.531 + * 1.532 + */ 1.533 + abstract public void insert_Object(org.omg.CORBA.Object o, TypeCode t) 1.534 + throws BAD_PARAM; 1.535 + 1.536 + /** 1.537 + * Extracts the <code>String</code> object in this 1.538 + * <code>Any</code> object's <code>value</code> field. 1.539 + * 1.540 + * @return the <code>String</code> object stored in this <code>Any</code> object 1.541 + * @exception BAD_OPERATION if this <code>Any</code> object 1.542 + * contains something other than a <code>String</code> object or the 1.543 + * <code>value</code> field has not yet been set 1.544 + */ 1.545 + abstract public String extract_string() throws BAD_OPERATION; 1.546 + 1.547 + /** 1.548 + * Inserts the given <code>String</code> object 1.549 + * into this <code>Any</code> object's <code>value</code> field. 1.550 + * 1.551 + * @param s the <code>String</code> object to insert into this 1.552 + * <code>Any</code> object 1.553 + * @exception DATA_CONVERSION if there is a data conversion error 1.554 + * @exception MARSHAL if the ORB has a problem marshalling or 1.555 + * unmarshalling parameters 1.556 + */ 1.557 + abstract public void insert_string(String s) throws DATA_CONVERSION, MARSHAL; 1.558 + 1.559 + /** 1.560 + * Extracts the <code>String</code> object in this 1.561 + * <code>Any</code> object's <code>value</code> field. 1.562 + * 1.563 + * @return the <code>String</code> object stored in this <code>Any</code> object 1.564 + * @exception BAD_OPERATION if this <code>Any</code> object 1.565 + * contains something other than a <code>String</code> object or the 1.566 + * <code>value</code> field has not yet been set 1.567 + */ 1.568 + abstract public String extract_wstring() throws BAD_OPERATION; 1.569 + 1.570 + /** 1.571 + * Inserts the given <code>String</code> object 1.572 + * into this <code>Any</code> object's <code>value</code> field. 1.573 + * 1.574 + * @param s the <code>String</code> object to insert into this 1.575 + * <code>Any</code> object 1.576 + * @exception MARSHAL if the ORB has a problem marshalling or 1.577 + * unmarshalling parameters 1.578 + */ 1.579 + abstract public void insert_wstring(String s) throws MARSHAL; 1.580 + 1.581 + /** 1.582 + * Extracts the <code>TypeCode</code> object in this 1.583 + * <code>Any</code> object's <code>value</code> field. 1.584 + * 1.585 + * @return the <code>TypeCode</code> object stored in this <code>Any</code> object 1.586 + * @exception BAD_OPERATION if this <code>Any</code> object 1.587 + * contains something other than a <code>TypeCode</code> object or the 1.588 + * <code>value</code> field has not yet been set 1.589 + */ 1.590 + abstract public TypeCode extract_TypeCode() throws BAD_OPERATION; 1.591 + 1.592 + /** 1.593 + * Inserts the given <code>TypeCode</code> object 1.594 + * into this <code>Any</code> object's <code>value</code> field. 1.595 + * 1.596 + * @param t the <code>TypeCode</code> object to insert into this 1.597 + * <code>Any</code> object 1.598 + */ 1.599 + abstract public void insert_TypeCode(TypeCode t); 1.600 + 1.601 + /** 1.602 + * Extracts the <code>Principal</code> object in this 1.603 + * <code>Any</code> object's <code>value</code> field. 1.604 + * Note that the class <code>Principal</code> has been deprecated. 1.605 + * 1.606 + * @return the <code>Principal</code> object stored in this <code>Any</code> object 1.607 + * @exception BAD_OPERATION if this <code>Any</code> object 1.608 + * contains something other than a 1.609 + * <code>Principal</code> object or the 1.610 + * <code>value</code> field has not yet been set 1.611 + * @see <a href="package-summary.html#unimpl"><code>CORBA</code> package 1.612 + * comments for unimplemented features</a> 1.613 + * @deprecated Deprecated by CORBA 2.2. 1.614 + */ 1.615 + @Deprecated 1.616 + public Principal extract_Principal() throws BAD_OPERATION { 1.617 + throw new org.omg.CORBA.NO_IMPLEMENT() ; 1.618 + } 1.619 + 1.620 + /** 1.621 + * Inserts the given <code>Principal</code> object 1.622 + * into this <code>Any</code> object's <code>value</code> field. 1.623 + * Note that the class <code>Principal</code> has been deprecated. 1.624 + * 1.625 + * @param p the <code>Principal</code> object to insert into this 1.626 + * <code>Any</code> object 1.627 + * @see <a href="package-summary.html#unimpl"><code>CORBA</code> package 1.628 + * comments for unimplemented features</a> 1.629 + * @deprecated Deprecated by CORBA 2.2. 1.630 + */ 1.631 + @Deprecated 1.632 + public void insert_Principal(Principal p) { 1.633 + throw new org.omg.CORBA.NO_IMPLEMENT() ; 1.634 + } 1.635 + 1.636 + /////////////////////////////////////////////////////////////////////////// 1.637 + // insertion/extraction of streamables 1.638 + 1.639 + /** 1.640 + * Extracts a <code>Streamable</code> from this <code>Any</code> object's 1.641 + * <code>value</code> field. This method allows the extraction of 1.642 + * non-primitive IDL types. 1.643 + * 1.644 + * @return the <code>Streamable</code> stored in the <code>Any</code> object. 1.645 + * @throws BAD_INV_ORDER if the caller has invoked operations in the wrong order 1.646 + * @see <a href="package-summary.html#unimpl"><code>CORBA</code> package 1.647 + * comments for unimplemented features</a> 1.648 + */ 1.649 + public org.omg.CORBA.portable.Streamable extract_Streamable() 1.650 + throws org.omg.CORBA.BAD_INV_ORDER { 1.651 + throw new org.omg.CORBA.NO_IMPLEMENT() ; 1.652 + } 1.653 + 1.654 + /** 1.655 + * Inserts the given <code>Streamable</code> object 1.656 + * into this <code>Any</code> object's <code>value</code> field. 1.657 + * This method allows the insertion of non-primitive IDL types. 1.658 + * 1.659 + * @param s the <code>Streamable</code> object to insert into this 1.660 + * <code>Any</code> object; may be a non-primitive 1.661 + * IDL type 1.662 + * @see <a href="package-summary.html#unimpl"><code>CORBA</code> package 1.663 + * comments for unimplemented features</a> 1.664 + */ 1.665 + public void insert_Streamable(Streamable s) { 1.666 + throw new org.omg.CORBA.NO_IMPLEMENT() ; 1.667 + } 1.668 + 1.669 + /** 1.670 + * Extracts the <code>java.math.BigDecimal</code> object in this 1.671 + * <code>Any</code> object's <code>value</code> field. 1.672 + * 1.673 + * @return the <code>java.math.BigDecimal</code> object 1.674 + * stored in this <code>Any</code> object 1.675 + * @exception BAD_OPERATION if this <code>Any</code> object 1.676 + * contains something other than a 1.677 + * <code>java.math.BigDecimal</code> object or the 1.678 + * <code>value</code> field has not yet been set 1.679 + * @see <a href="package-summary.html#unimpl"><code>CORBA</code> package 1.680 + * comments for unimplemented features</a> 1.681 + */ 1.682 + public java.math.BigDecimal extract_fixed() { 1.683 + throw new org.omg.CORBA.NO_IMPLEMENT(); 1.684 + } 1.685 + 1.686 + /** 1.687 + * Throws an <a href="package-summary.html#NO_IMPLEMENT"> 1.688 + * <code>org.omg.CORBA.NO_IMPLEMENT</code></a> exception. 1.689 + * <P> 1.690 + * Inserts the given <code>java.math.BigDecimal</code> object 1.691 + * into this <code>Any</code> object's <code>value</code> field. 1.692 + * 1.693 + * @param value the <code>java.math.BigDecimal</code> object 1.694 + * to insert into this <code>Any</code> object 1.695 + * @see <a href="package-summary.html#unimpl"><code>CORBA</code> package 1.696 + * comments for unimplemented features</a> 1.697 + */ 1.698 + public void insert_fixed(java.math.BigDecimal value) { 1.699 + throw new org.omg.CORBA.NO_IMPLEMENT(); 1.700 + } 1.701 + 1.702 + /** 1.703 + * Throws an <a href="package-summary.html#NO_IMPLEMENT"> 1.704 + * <code>org.omg.CORBA.NO_IMPLEMENT</code></a> exception. 1.705 + * <P> 1.706 + * Inserts the given <code>java.math.BigDecimal</code> object 1.707 + * into this <code>Any</code> object's <code>value</code> field. 1.708 + * 1.709 + * @param value the <code>java.math.BigDecimal</code> object 1.710 + * to insert into this <code>Any</code> object 1.711 + * @param type the <code>TypeCode</code> object that is to be inserted into 1.712 + * this <code>Any</code> object's <code>type</code> field 1.713 + * and that describes the <code>java.math.BigDecimal</code> 1.714 + * object being inserted 1.715 + * @throws org.omg.CORBA.BAD_INV_ORDER if this method is invoked improperly 1.716 + * @see <a href="package-summary.html#unimpl"><code>CORBA</code> package 1.717 + * comments for unimplemented features</a> 1.718 + */ 1.719 + public void insert_fixed(java.math.BigDecimal value, org.omg.CORBA.TypeCode type) 1.720 + throws org.omg.CORBA.BAD_INV_ORDER 1.721 + { 1.722 + throw new org.omg.CORBA.NO_IMPLEMENT(); 1.723 + } 1.724 +}