org.omg.CORBA
Class Any

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by org.omg.CORBA.Any
All Implemented Interfaces:
Serializable sample code for java.io.Serializable definition code for java.io.Serializable , IDLEntity sample code for org.omg.CORBA.portable.IDLEntity definition code for org.omg.CORBA.portable.IDLEntity

public abstract class Any
extends Object sample code for java.lang.Object definition code for java.lang.Object
implements IDLEntity sample code for org.omg.CORBA.portable.IDLEntity definition code for org.omg.CORBA.portable.IDLEntity

Serves as a container for any data that can be described in IDL or for any IDL primitive type. An Any object is used as a component of a NamedValue object, which provides information about arguments or return values in requests, and which is used to define name/value pairs in Context objects.

An Any object consists of two parts:

  1. a data value
  2. a TypeCode object describing the type of the data value contained in the Any object. For example, a TypeCode object for an array contains a field for the length of the array and a field for the type of elements in the array. (Note that in this case, the second field of the TypeCode object is itself a TypeCode object.)

A large part of the Any class consists of pairs of methods for inserting values into and extracting values from an Any object.

For a given primitive type X, these methods are:

void insert_X(X x)
This method allows the insertion of an instance x of primitive type X into the value field of the Any object. Note that the method insert_X also resets the Any object's type field if necessary.
X extract_X()
This method allows the extraction of an instance of type X from the Any object.

This method throws the exception BAD_OPERATION under two conditions:

  1. the type of the element contained in the Any object is not X
  2. the method extract_X is called before the value field of the Any object has been set

There are distinct method pairs for each primitive IDL data type (insert_long and extract_long, insert_string and extract_string, and so on).

The class Any also has methods for getting and setting the type code, for testing two Any objects for equality, and for reading an Any object from a stream or writing it to a stream.

Since:
JDK1.2
See Also:
Serialized Form

Constructor Summary
Any sample code for org.omg.CORBA.Any.Any() definition code for org.omg.CORBA.Any.Any() ()
           
 
Method Summary
abstract  InputStream sample code for org.omg.CORBA.portable.InputStream definition code for org.omg.CORBA.portable.InputStream create_input_stream sample code for org.omg.CORBA.Any.create_input_stream() definition code for org.omg.CORBA.Any.create_input_stream() ()
          Creates an input stream from which this Any object's value can be unmarshalled.
abstract  OutputStream sample code for org.omg.CORBA.portable.OutputStream definition code for org.omg.CORBA.portable.OutputStream create_output_stream sample code for org.omg.CORBA.Any.create_output_stream() definition code for org.omg.CORBA.Any.create_output_stream() ()
          Creates an output stream into which this Any object's value can be marshalled.
abstract  boolean equal sample code for org.omg.CORBA.Any.equal(org.omg.CORBA.Any) definition code for org.omg.CORBA.Any.equal(org.omg.CORBA.Any) (Any sample code for org.omg.CORBA.Any definition code for org.omg.CORBA.Any  a)
          Checks for equality between this Any object and the given Any object.
abstract  Any sample code for org.omg.CORBA.Any definition code for org.omg.CORBA.Any extract_any sample code for org.omg.CORBA.Any.extract_any() definition code for org.omg.CORBA.Any.extract_any() ()
          Extracts the Any object in this Any object's value field.
abstract  boolean extract_boolean sample code for org.omg.CORBA.Any.extract_boolean() definition code for org.omg.CORBA.Any.extract_boolean() ()
          Extracts the boolean in this Any object's value field.
abstract  char extract_char sample code for org.omg.CORBA.Any.extract_char() definition code for org.omg.CORBA.Any.extract_char() ()
          Extracts the char in this Any object's value field.
abstract  double extract_double sample code for org.omg.CORBA.Any.extract_double() definition code for org.omg.CORBA.Any.extract_double() ()
          Extracts the double in this Any object's value field.
 BigDecimal sample code for java.math.BigDecimal definition code for java.math.BigDecimal extract_fixed sample code for org.omg.CORBA.Any.extract_fixed() definition code for org.omg.CORBA.Any.extract_fixed() ()
          Extracts the java.math.BigDecimal object in this Any object's value field.
abstract  float extract_float sample code for org.omg.CORBA.Any.extract_float() definition code for org.omg.CORBA.Any.extract_float() ()
          Extracts the float in this Any object's value field.
abstract  int extract_long sample code for org.omg.CORBA.Any.extract_long() definition code for org.omg.CORBA.Any.extract_long() ()
          Extracts the int in this Any object's value field.
abstract  long extract_longlong sample code for org.omg.CORBA.Any.extract_longlong() definition code for org.omg.CORBA.Any.extract_longlong() ()
          Extracts the long in this Any object's value field.
abstract  Object sample code for org.omg.CORBA.Object definition code for org.omg.CORBA.Object extract_Object sample code for org.omg.CORBA.Any.extract_Object() definition code for org.omg.CORBA.Any.extract_Object() ()
          Extracts the org.omg.CORBA.Object in this Any object's value field.
abstract  byte extract_octet sample code for org.omg.CORBA.Any.extract_octet() definition code for org.omg.CORBA.Any.extract_octet() ()
          Extracts the byte in this Any object's value field.
 Principal sample code for org.omg.CORBA.Principal definition code for org.omg.CORBA.Principal extract_Principal sample code for org.omg.CORBA.Any.extract_Principal() definition code for org.omg.CORBA.Any.extract_Principal() ()
          Deprecated. Deprecated by CORBA 2.2.
abstract  short extract_short sample code for org.omg.CORBA.Any.extract_short() definition code for org.omg.CORBA.Any.extract_short() ()
          Extracts the short in this Any object's value field.
 Streamable sample code for org.omg.CORBA.portable.Streamable definition code for org.omg.CORBA.portable.Streamable extract_Streamable sample code for org.omg.CORBA.Any.extract_Streamable() definition code for org.omg.CORBA.Any.extract_Streamable() ()
          Extracts a Streamable from this Any object's value field.
abstract  String sample code for java.lang.String definition code for java.lang.String extract_string sample code for org.omg.CORBA.Any.extract_string() definition code for org.omg.CORBA.Any.extract_string() ()
          Extracts the String object in this Any object's value field.
abstract  TypeCode sample code for org.omg.CORBA.TypeCode definition code for org.omg.CORBA.TypeCode extract_TypeCode sample code for org.omg.CORBA.Any.extract_TypeCode() definition code for org.omg.CORBA.Any.extract_TypeCode() ()
          Extracts the TypeCode object in this Any object's value field.
abstract  int extract_ulong sample code for org.omg.CORBA.Any.extract_ulong() definition code for org.omg.CORBA.Any.extract_ulong() ()
          Extracts the int in this Any object's value field.
abstract  long extract_ulonglong sample code for org.omg.CORBA.Any.extract_ulonglong() definition code for org.omg.CORBA.Any.extract_ulonglong() ()
          Extracts the long in this Any object's value field.
abstract  short extract_ushort sample code for org.omg.CORBA.Any.extract_ushort() definition code for org.omg.CORBA.Any.extract_ushort() ()
          Extracts the short in this Any object's value field.
abstract  Serializable sample code for java.io.Serializable definition code for java.io.Serializable extract_Value sample code for org.omg.CORBA.Any.extract_Value() definition code for org.omg.CORBA.Any.extract_Value() ()
          Extracts the java.io.Serializable object in this Any object's value field.
abstract  char extract_wchar sample code for org.omg.CORBA.Any.extract_wchar() definition code for org.omg.CORBA.Any.extract_wchar() ()
          Extracts the char in this Any object's value field.
abstract  String sample code for java.lang.String definition code for java.lang.String extract_wstring sample code for org.omg.CORBA.Any.extract_wstring() definition code for org.omg.CORBA.Any.extract_wstring() ()
          Extracts the String object in this Any object's value field.
abstract  void insert_any sample code for org.omg.CORBA.Any.insert_any(org.omg.CORBA.Any) definition code for org.omg.CORBA.Any.insert_any(org.omg.CORBA.Any) (Any sample code for org.omg.CORBA.Any definition code for org.omg.CORBA.Any  a)
          Inserts the given Any object into this Any object's value field.
abstract  void insert_boolean sample code for org.omg.CORBA.Any.insert_boolean(boolean) definition code for org.omg.CORBA.Any.insert_boolean(boolean) (boolean b)
          Inserts the given boolean into this Any object's value field.
abstract  void insert_char sample code for org.omg.CORBA.Any.insert_char(char) definition code for org.omg.CORBA.Any.insert_char(char) (char c)
          Inserts the given char into this Any object's value field.
abstract  void insert_double sample code for org.omg.CORBA.Any.insert_double(double) definition code for org.omg.CORBA.Any.insert_double(double) (double d)
          Inserts the given double into this Any object's value field.
 void insert_fixed sample code for org.omg.CORBA.Any.insert_fixed(java.math.BigDecimal) definition code for org.omg.CORBA.Any.insert_fixed(java.math.BigDecimal) (BigDecimal sample code for java.math.BigDecimal definition code for java.math.BigDecimal  value)
          Throws an org.omg.CORBA.NO_IMPLEMENT exception.
 void insert_fixed sample code for org.omg.CORBA.Any.insert_fixed(java.math.BigDecimal, org.omg.CORBA.TypeCode) definition code for org.omg.CORBA.Any.insert_fixed(java.math.BigDecimal, org.omg.CORBA.TypeCode) (BigDecimal sample code for java.math.BigDecimal definition code for java.math.BigDecimal  value, TypeCode sample code for org.omg.CORBA.TypeCode definition code for org.omg.CORBA.TypeCode  type)
          Throws an org.omg.CORBA.NO_IMPLEMENT exception.
abstract  void insert_float sample code for org.omg.CORBA.Any.insert_float(float) definition code for org.omg.CORBA.Any.insert_float(float) (float f)
          Inserts the given float into this Any object's value field.
abstract  void insert_long sample code for org.omg.CORBA.Any.insert_long(int) definition code for org.omg.CORBA.Any.insert_long(int) (int l)
          Inserts the given int into this Any object's value field.
abstract  void insert_longlong sample code for org.omg.CORBA.Any.insert_longlong(long) definition code for org.omg.CORBA.Any.insert_longlong(long) (long l)
          Inserts the given long into this Any object's value field.
abstract  void insert_Object sample code for org.omg.CORBA.Any.insert_Object(org.omg.CORBA.Object) definition code for org.omg.CORBA.Any.insert_Object(org.omg.CORBA.Object) (Object sample code for org.omg.CORBA.Object definition code for org.omg.CORBA.Object  o)
          Inserts the given org.omg.CORBA.Object object into this Any object's value field.
abstract  void insert_Object sample code for org.omg.CORBA.Any.insert_Object(org.omg.CORBA.Object, org.omg.CORBA.TypeCode) definition code for org.omg.CORBA.Any.insert_Object(org.omg.CORBA.Object, org.omg.CORBA.TypeCode) (Object sample code for org.omg.CORBA.Object definition code for org.omg.CORBA.Object  o, TypeCode sample code for org.omg.CORBA.TypeCode definition code for org.omg.CORBA.TypeCode  t)
          Inserts the given org.omg.CORBA.Object object into this Any object's value field.
abstract  void insert_octet sample code for org.omg.CORBA.Any.insert_octet(byte) definition code for org.omg.CORBA.Any.insert_octet(byte) (byte b)
          Inserts the given byte into this Any object's value field.
 void insert_Principal sample code for org.omg.CORBA.Any.insert_Principal(org.omg.CORBA.Principal) definition code for org.omg.CORBA.Any.insert_Principal(org.omg.CORBA.Principal) (Principal sample code for org.omg.CORBA.Principal definition code for org.omg.CORBA.Principal  p)
          Deprecated. Deprecated by CORBA 2.2.
abstract  void insert_short sample code for org.omg.CORBA.Any.insert_short(short) definition code for org.omg.CORBA.Any.insert_short(short) (short s)
          Inserts the given short into this Any object's value field.
 void insert_Streamable sample code for org.omg.CORBA.Any.insert_Streamable(org.omg.CORBA.portable.Streamable) definition code for org.omg.CORBA.Any.insert_Streamable(org.omg.CORBA.portable.Streamable) (Streamable sample code for org.omg.CORBA.portable.Streamable definition code for org.omg.CORBA.portable.Streamable  s)
          Inserts the given Streamable object into this Any object's value field.
abstract  void insert_string sample code for org.omg.CORBA.Any.insert_string(java.lang.String) definition code for org.omg.CORBA.Any.insert_string(java.lang.String) (String sample code for java.lang.String definition code for java.lang.String  s)
          Inserts the given String object into this Any object's value field.
abstract  void insert_TypeCode sample code for org.omg.CORBA.Any.insert_TypeCode(org.omg.CORBA.TypeCode) definition code for org.omg.CORBA.Any.insert_TypeCode(org.omg.CORBA.TypeCode) (TypeCode sample code for org.omg.CORBA.TypeCode definition code for org.omg.CORBA.TypeCode  t)
          Inserts the given TypeCode object into this Any object's value field.
abstract  void insert_ulong sample code for org.omg.CORBA.Any.insert_ulong(int) definition code for org.omg.CORBA.Any.insert_ulong(int) (int l)
          Inserts the given int into this Any object's value field.
abstract  void insert_ulonglong sample code for org.omg.CORBA.Any.insert_ulonglong(long) definition code for org.omg.CORBA.Any.insert_ulonglong(long) (long l)
          Inserts the given long into this Any object's value field.
abstract  void insert_ushort sample code for org.omg.CORBA.Any.insert_ushort(short) definition code for org.omg.CORBA.Any.insert_ushort(short) (short s)
          Inserts the given short into this Any object's value field.
abstract  void insert_Value sample code for org.omg.CORBA.Any.insert_Value(java.io.Serializable) definition code for org.omg.CORBA.Any.insert_Value(java.io.Serializable) (Serializable sample code for java.io.Serializable definition code for java.io.Serializable  v)
          Inserts the given java.io.Serializable object into this Any object's value field.
abstract  void insert_Value sample code for org.omg.CORBA.Any.insert_Value(java.io.Serializable, org.omg.CORBA.TypeCode) definition code for org.omg.CORBA.Any.insert_Value(java.io.Serializable, org.omg.CORBA.TypeCode) (Serializable sample code for java.io.Serializable definition code for java.io.Serializable  v, TypeCode sample code for org.omg.CORBA.TypeCode definition code for org.omg.CORBA.TypeCode  t)
          Inserts the given java.io.Serializable object into this Any object's value field.
abstract  void insert_wchar sample code for org.omg.CORBA.Any.insert_wchar(char) definition code for org.omg.CORBA.Any.insert_wchar(char) (char c)
          Inserts the given char into this Any object's value field.
abstract  void insert_wstring sample code for org.omg.CORBA.Any.insert_wstring(java.lang.String) definition code for org.omg.CORBA.Any.insert_wstring(java.lang.String) (String sample code for java.lang.String definition code for java.lang.String  s)
          Inserts the given String object into this Any object's value field.
abstract  void read_value sample code for org.omg.CORBA.Any.read_value(org.omg.CORBA.portable.InputStream, org.omg.CORBA.TypeCode) definition code for org.omg.CORBA.Any.read_value(org.omg.CORBA.portable.InputStream, org.omg.CORBA.TypeCode) (InputStream sample code for org.omg.CORBA.portable.InputStream definition code for org.omg.CORBA.portable.InputStream  is, TypeCode sample code for org.omg.CORBA.TypeCode definition code for org.omg.CORBA.TypeCode  t)
          Reads off (unmarshals) the value of an Any object from the given input stream using the given typecode.
abstract  TypeCode sample code for org.omg.CORBA.TypeCode definition code for org.omg.CORBA.TypeCode type sample code for org.omg.CORBA.Any.type() definition code for org.omg.CORBA.Any.type() ()
          Returns type information for the element contained in this Any object.
abstract  void type sample code for org.omg.CORBA.Any.type(org.omg.CORBA.TypeCode) definition code for org.omg.CORBA.Any.type(org.omg.CORBA.TypeCode) (TypeCode sample code for org.omg.CORBA.TypeCode definition code for org.omg.CORBA.TypeCode  t)
          Sets this Any object's type field to the given TypeCode object and clears its value.
abstract  void write_value sample code for org.omg.CORBA.Any.write_value(org.omg.CORBA.portable.OutputStream) definition code for org.omg.CORBA.Any.write_value(org.omg.CORBA.portable.OutputStream) (OutputStream sample code for org.omg.CORBA.portable.OutputStream definition code for org.omg.CORBA.portable.OutputStream  os)
          Writes out the value of this Any object to the given output stream.
 
Methods inherited from class java.lang.Object sample code for java.lang.Object definition code for java.lang.Object
clone sample code for java.lang.Object.clone() definition code for java.lang.Object.clone() , equals sample code for java.lang.Object.equals(java.lang.Object) definition code for java.lang.Object.equals(java.lang.Object) , finalize sample code for java.lang.Object.finalize() definition code for java.lang.Object.finalize() , getClass sample code for java.lang.Object.getClass() definition code for java.lang.Object.getClass() , hashCode sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() , notify sample code for java.lang.Object.notify() definition code for java.lang.Object.notify() , notifyAll sample code for java.lang.Object.notifyAll() definition code for java.lang.Object.notifyAll() , toString sample code for java.lang.Object.toString() definition code for java.lang.Object.toString() , wait sample code for java.lang.Object.wait() definition code for java.lang.Object.wait() , wait sample code for java.lang.Object.wait(long) definition code for java.lang.Object.wait(long) , wait sample code for java.lang.Object.wait(long, int) definition code for java.lang.Object.wait(long, int)
 

Constructor Detail

Any sample code for org.omg.CORBA.Any() definition code for org.omg.CORBA.Any()

public Any()
Method Detail

equal sample code for org.omg.CORBA.Any.equal(org.omg.CORBA.Any) definition code for org.omg.CORBA.Any.equal(org.omg.CORBA.Any)

public abstract boolean equal(Any sample code for org.omg.CORBA.Any definition code for org.omg.CORBA.Any  a)
Checks for equality between this Any object and the given Any object. Two Any objects are equal if both their values and type codes are equal.

Parameters:
a - the Any object to test for equality
Returns:
true if the Any objects are equal; false otherwise
See Also:
CORBA package comments for unimplemented features

type sample code for org.omg.CORBA.Any.type() definition code for org.omg.CORBA.Any.type()

public abstract TypeCode sample code for org.omg.CORBA.TypeCode definition code for org.omg.CORBA.TypeCode  type()
Returns type information for the element contained in this Any object.

Returns:
the TypeCode object containing type information about the value contained in this Any object

type sample code for org.omg.CORBA.Any.type(org.omg.CORBA.TypeCode) definition code for org.omg.CORBA.Any.type(org.omg.CORBA.TypeCode)

public abstract void type(TypeCode sample code for org.omg.CORBA.TypeCode definition code for org.omg.CORBA.TypeCode  t)
Sets this Any object's type field to the given TypeCode object and clears its value.

Note that using this method to set the type code wipes out the value if there is one. The method is provided primarily so that the type may be set properly for IDL out parameters. Generally, setting the type is done by the insert_X methods, which will set the type to X if it is not already set to X.

Parameters:
t - the TypeCode object giving information for the value in this Any object

read_value sample code for org.omg.CORBA.Any.read_value(org.omg.CORBA.portable.InputStream, org.omg.CORBA.TypeCode) definition code for org.omg.CORBA.Any.read_value(org.omg.CORBA.portable.InputStream, org.omg.CORBA.TypeCode)

public abstract void read_value(InputStream sample code for org.omg.CORBA.portable.InputStream definition code for org.omg.CORBA.portable.InputStream  is,
                                TypeCode sample code for org.omg.CORBA.TypeCode definition code for org.omg.CORBA.TypeCode  t)
                         throws MARSHAL sample code for org.omg.CORBA.MARSHAL definition code for org.omg.CORBA.MARSHAL 
Reads off (unmarshals) the value of an Any object from the given input stream using the given typecode.

Parameters:
is - the org.omg.CORBA.portable.InputStream object from which to read the value contained in this Any object
t - a TypeCode object containing type information about the value to be read
Throws:
MARSHAL sample code for org.omg.CORBA.MARSHAL definition code for org.omg.CORBA.MARSHAL - when the given TypeCode object is not consistent with the value that was contained in the input stream

write_value sample code for org.omg.CORBA.Any.write_value(org.omg.CORBA.portable.OutputStream) definition code for org.omg.CORBA.Any.write_value(org.omg.CORBA.portable.OutputStream)

public abstract void write_value(OutputStream sample code for org.omg.CORBA.portable.OutputStream definition code for org.omg.CORBA.portable.OutputStream  os)
Writes out the value of this Any object to the given output stream. If both typecode and value need to be written, use create_output_stream() to create an OutputStream, then use write_any on the OutputStream.

If this method is called on an Any object that has not had a value inserted into its value field, it will throw the exception java.lang.NullPointerException.

Parameters:
os - the org.omg.CORBA.portable.OutputStream object into which to marshal the value of this Any object

create_output_stream sample code for org.omg.CORBA.Any.create_output_stream() definition code for org.omg.CORBA.Any.create_output_stream()

public abstract OutputStream sample code for org.omg.CORBA.portable.OutputStream definition code for org.omg.CORBA.portable.OutputStream  create_output_stream()
Creates an output stream into which this Any object's value can be marshalled.

Returns:
the newly-created OutputStream

create_input_stream sample code for org.omg.CORBA.Any.create_input_stream() definition code for org.omg.CORBA.Any.create_input_stream()

public abstract InputStream sample code for org.omg.CORBA.portable.InputStream definition code for org.omg.CORBA.portable.InputStream  create_input_stream()
Creates an input stream from which this Any object's value can be unmarshalled.

Returns:
the newly-created InputStream

extract_short sample code for org.omg.CORBA.Any.extract_short() definition code for org.omg.CORBA.Any.extract_short()

public abstract short extract_short()
                             throws BAD_OPERATION sample code for org.omg.CORBA.BAD_OPERATION definition code for org.omg.CORBA.BAD_OPERATION 
Extracts the short in this Any object's value field.

Returns:
the short stored in this Any object
Throws:
BAD_OPERATION sample code for org.omg.CORBA.BAD_OPERATION definition code for org.omg.CORBA.BAD_OPERATION - if this Any object contains something other than a short or the value field has not yet been set

insert_short sample code for org.omg.CORBA.Any.insert_short(short) definition code for org.omg.CORBA.Any.insert_short(short)

public abstract void insert_short(short s)
Inserts the given short into this Any object's value field.

Parameters:
s - the short to insert into this Any object

extract_long sample code for org.omg.CORBA.Any.extract_long() definition code for org.omg.CORBA.Any.extract_long()

public abstract int extract_long()
                          throws BAD_OPERATION sample code for org.omg.CORBA.BAD_OPERATION definition code for org.omg.CORBA.BAD_OPERATION 
Extracts the int in this Any object's value field.

Returns:
the int stored in this Any object
Throws:
BAD_OPERATION sample code for org.omg.CORBA.BAD_OPERATION definition code for org.omg.CORBA.BAD_OPERATION - if this Any object contains something other than an int or the value field has not yet been set

insert_long sample code for org.omg.CORBA.Any.insert_long(int) definition code for org.omg.CORBA.Any.insert_long(int)

public abstract void insert_long(int l)
Inserts the given int into this Any object's value field.

Parameters:
l - the int to insert into this Any object

extract_longlong sample code for org.omg.CORBA.Any.extract_longlong() definition code for org.omg.CORBA.Any.extract_longlong()

public abstract long extract_longlong()
                               throws BAD_OPERATION sample code for org.omg.CORBA.BAD_OPERATION definition code for org.omg.CORBA.BAD_OPERATION 
Extracts the long in this Any object's value field.

Returns:
the long stored in this Any object
Throws:
BAD_OPERATION sample code for org.omg.CORBA.BAD_OPERATION definition code for org.omg.CORBA.BAD_OPERATION - if this Any object contains something other than a long or the value field has not yet been set

insert_longlong sample code for org.omg.CORBA.Any.insert_longlong(long) definition code for org.omg.CORBA.Any.insert_longlong(long)

public abstract void insert_longlong(long l)
Inserts the given long into this Any object's value field.

Parameters:
l - the long to insert into this Any object

extract_ushort sample code for org.omg.CORBA.Any.extract_ushort() definition code for org.omg.CORBA.Any.extract_ushort()

public abstract short extract_ushort()
                              throws BAD_OPERATION sample code for org.omg.CORBA.BAD_OPERATION definition code for org.omg.CORBA.BAD_OPERATION 
Extracts the short in this Any object's value field.

Returns:
the short stored in this Any object
Throws:
BAD_OPERATION sample code for org.omg.CORBA.BAD_OPERATION definition code for org.omg.CORBA.BAD_OPERATION - if this Any object contains something other than a short or the value field has not yet been set

insert_ushort sample code for org.omg.CORBA.Any.insert_ushort(short) definition code for org.omg.CORBA.Any.insert_ushort(short)

public abstract void insert_ushort(short s)
Inserts the given short into this Any object's value field.

Parameters:
s - the short to insert into this Any object

extract_ulong sample code for org.omg.CORBA.Any.extract_ulong() definition code for org.omg.CORBA.Any.extract_ulong()

public abstract int extract_ulong()
                           throws BAD_OPERATION sample code for org.omg.CORBA.BAD_OPERATION definition code for org.omg.CORBA.BAD_OPERATION 
Extracts the int in this Any object's value field.

Returns:
the int stored in this Any object
Throws:
BAD_OPERATION sample code for org.omg.CORBA.BAD_OPERATION definition code for org.omg.CORBA.BAD_OPERATION - if this Any object contains something other than an int or the value field has not yet been set

insert_ulong sample code for org.omg.CORBA.Any.insert_ulong(int) definition code for org.omg.CORBA.Any.insert_ulong(int)

public abstract void insert_ulong(int l)
Inserts the given int into this Any object's value field.

Parameters:
l - the int to insert into this Any object

extract_ulonglong sample code for org.omg.CORBA.Any.extract_ulonglong() definition code for org.omg.CORBA.Any.extract_ulonglong()

public abstract long extract_ulonglong()
                                throws BAD_OPERATION sample code for org.omg.CORBA.BAD_OPERATION definition code for org.omg.CORBA.BAD_OPERATION 
Extracts the long in this Any object's value field.

Returns:
the long stored in this Any object
Throws:
BAD_OPERATION sample code for org.omg.CORBA.BAD_OPERATION definition code for org.omg.CORBA.BAD_OPERATION - if this Any object contains something other than a long or the value field has not yet been set

insert_ulonglong sample code for org.omg.CORBA.Any.insert_ulonglong(long) definition code for org.omg.CORBA.Any.insert_ulonglong(long)

public abstract void insert_ulonglong(long l)
Inserts the given long into this Any object's value field.

Parameters:
l - the long to insert into this Any object

extract_float sample code for org.omg.CORBA.Any.extract_float() definition code for org.omg.CORBA.Any.extract_float()

public abstract float extract_float()
                             throws BAD_OPERATION sample code for org.omg.CORBA.BAD_OPERATION definition code for org.omg.CORBA.BAD_OPERATION 
Extracts the float in this Any object's value field.

Returns:
the float stored in this Any object
Throws:
BAD_OPERATION sample code for org.omg.CORBA.BAD_OPERATION definition code for org.omg.CORBA.BAD_OPERATION - if this Any object contains something other than a float or the value field has not yet been set

insert_float sample code for org.omg.CORBA.Any.insert_float(float) definition code for org.omg.CORBA.Any.insert_float(float)

public abstract void insert_float(float f)
Inserts the given float into this Any object's value field.

Parameters:
f - the float to insert into this Any object

extract_double sample code for org.omg.CORBA.Any.extract_double() definition code for org.omg.CORBA.Any.extract_double()

public abstract double extract_double()
                               throws BAD_OPERATION sample code for org.omg.CORBA.BAD_OPERATION definition code for org.omg.CORBA.BAD_OPERATION 
Extracts the double in this Any object's value field.

Returns:
the double stored in this Any object
Throws:
BAD_OPERATION sample code for org.omg.CORBA.BAD_OPERATION definition code for org.omg.CORBA.BAD_OPERATION - if this Any object contains something other than a double or the value field has not yet been set

insert_double sample code for org.omg.CORBA.Any.insert_double(double) definition code for org.omg.CORBA.Any.insert_double(double)

public abstract void insert_double(double d)
Inserts the given double into this Any object's value field.

Parameters:
d - the double to insert into this Any object

extract_boolean sample code for org.omg.CORBA.Any.extract_boolean() definition code for org.omg.CORBA.Any.extract_boolean()

public abstract boolean extract_boolean()
                                 throws BAD_OPERATION sample code for org.omg.CORBA.BAD_OPERATION definition code for org.omg.CORBA.BAD_OPERATION 
Extracts the boolean in this Any object's value field.

Returns:
the boolean stored in this Any object
Throws:
BAD_OPERATION sample code for org.omg.CORBA.BAD_OPERATION definition code for org.omg.CORBA.BAD_OPERATION - if this Any object contains something other than a boolean or the value field has not yet been set

insert_boolean sample code for org.omg.CORBA.Any.insert_boolean(boolean) definition code for org.omg.CORBA.Any.insert_boolean(boolean)

public abstract void insert_boolean(boolean b)
Inserts the given boolean into this Any object's value field.

Parameters:
b - the boolean to insert into this Any object

extract_char sample code for org.omg.CORBA.Any.extract_char() definition code for org.omg.CORBA.Any.extract_char()

public abstract char extract_char()
                           throws BAD_OPERATION sample code for org.omg.CORBA.BAD_OPERATION definition code for org.omg.CORBA.BAD_OPERATION 
Extracts the char in this Any object's value field.

Returns:
the char stored in this Any object
Throws:
BAD_OPERATION sample code for org.omg.CORBA.BAD_OPERATION definition code for org.omg.CORBA.BAD_OPERATION - if this Any object contains something other than a char or the value field has not yet been set

insert_char sample code for org.omg.CORBA.Any.insert_char(char) definition code for org.omg.CORBA.Any.insert_char(char)

public abstract void insert_char(char c)
                          throws DATA_CONVERSION sample code for org.omg.CORBA.DATA_CONVERSION definition code for org.omg.CORBA.DATA_CONVERSION 
Inserts the given char into this Any object's value field.

Parameters:
c - the char to insert into this Any object
Throws:
DATA_CONVERSION sample code for org.omg.CORBA.DATA_CONVERSION definition code for org.omg.CORBA.DATA_CONVERSION - if there is a data conversion error

extract_wchar sample code for org.omg.CORBA.Any.extract_wchar() definition code for org.omg.CORBA.Any.extract_wchar()

public abstract char extract_wchar()
                            throws BAD_OPERATION sample code for org.omg.CORBA.BAD_OPERATION definition code for org.omg.CORBA.BAD_OPERATION 
Extracts the char in this Any object's value field.

Returns:
the char stored in this Any object
Throws:
BAD_OPERATION sample code for org.omg.CORBA.BAD_OPERATION definition code for org.omg.CORBA.BAD_OPERATION - if this Any object contains something other than a char or the value field has not yet been set

insert_wchar sample code for org.omg.CORBA.Any.insert_wchar(char) definition code for org.omg.CORBA.Any.insert_wchar(char)

public abstract void insert_wchar(char c)
Inserts the given char into this Any object's value field.

Parameters:
c - the char to insert into this Any object

extract_octet sample code for org.omg.CORBA.Any.extract_octet() definition code for org.omg.CORBA.Any.extract_octet()

public abstract byte extract_octet()
                            throws BAD_OPERATION sample code for org.omg.CORBA.BAD_OPERATION definition code for org.omg.CORBA.BAD_OPERATION 
Extracts the byte in this Any object's value field.

Returns:
the byte stored in this Any object
Throws:
BAD_OPERATION sample code for org.omg.CORBA.BAD_OPERATION definition code for org.omg.CORBA.BAD_OPERATION - if this Any object contains something other than a byte or the value field has not yet been set

insert_octet sample code for org.omg.CORBA.Any.insert_octet(byte) definition code for org.omg.CORBA.Any.insert_octet(byte)

public abstract void insert_octet(byte b)
Inserts the given byte into this Any object's value field.

Parameters:
b - the byte to insert into this Any object

extract_any sample code for org.omg.CORBA.Any.extract_any() definition code for org.omg.CORBA.Any.extract_any()

public abstract Any sample code for org.omg.CORBA.Any definition code for org.omg.CORBA.Any  extract_any()
                         throws BAD_OPERATION sample code for org.omg.CORBA.BAD_OPERATION definition code for org.omg.CORBA.BAD_OPERATION 
Extracts the Any object in this Any object's value field.

Returns:
the Any object stored in this Any object
Throws:
BAD_OPERATION sample code for org.omg.CORBA.BAD_OPERATION definition code for org.omg.CORBA.BAD_OPERATION - if this Any object contains something other than an Any object or the value field has not yet been set

insert_any sample code for org.omg.CORBA.Any.insert_any(org.omg.CORBA.Any) definition code for org.omg.CORBA.Any.insert_any(org.omg.CORBA.Any)

public abstract void insert_any(Any sample code for org.omg.CORBA.Any definition code for org.omg.CORBA.Any  a)
Inserts the given Any object into this Any object's value field.

Parameters:
a - the Any object to insert into this Any object

extract_Object sample code for org.omg.CORBA.Any.extract_Object() definition code for org.omg.CORBA.Any.extract_Object()

public abstract Object sample code for org.omg.CORBA.Object definition code for org.omg.CORBA.Object  extract_Object()
                               throws BAD_OPERATION sample code for org.omg.CORBA.BAD_OPERATION definition code for org.omg.CORBA.BAD_OPERATION 
Extracts the org.omg.CORBA.Object in this Any object's value field.

Returns:
the org.omg.CORBA.Object stored in this Any object
Throws:
BAD_OPERATION sample code for org.omg.CORBA.BAD_OPERATION definition code for org.omg.CORBA.BAD_OPERATION - if this Any object contains something other than an org.omg.CORBA.Object or the value field has not yet been set

insert_Object sample code for org.omg.CORBA.Any.insert_Object(org.omg.CORBA.Object) definition code for org.omg.CORBA.Any.insert_Object(org.omg.CORBA.Object)

public abstract void insert_Object(Object sample code for org.omg.CORBA.Object definition code for org.omg.CORBA.Object  o)
Inserts the given org.omg.CORBA.Object object into this Any object's value field.

Parameters:
o - the org.omg.CORBA.Object object to insert into this Any object

extract_Value sample code for org.omg.CORBA.Any.extract_Value() definition code for org.omg.CORBA.Any.extract_Value()

public abstract Serializable sample code for java.io.Serializable definition code for java.io.Serializable  extract_Value()
                                    throws BAD_OPERATION sample code for org.omg.CORBA.BAD_OPERATION definition code for org.omg.CORBA.BAD_OPERATION 
Extracts the java.io.Serializable object in this Any object's value field.

Returns:
the java.io.Serializable object stored in this Any object
Throws:
BAD_OPERATION sample code for org.omg.CORBA.BAD_OPERATION definition code for org.omg.CORBA.BAD_OPERATION - if this Any object contains something other than a java.io.Serializable object or the value field has not yet been set

insert_Value sample code for org.omg.CORBA.Any.insert_Value(java.io.Serializable) definition code for org.omg.CORBA.Any.insert_Value(java.io.Serializable)

public abstract void insert_Value(Serializable sample code for java.io.Serializable definition code for java.io.Serializable  v)
Inserts the given java.io.Serializable object into this Any object's value field.

Parameters:
v - the java.io.Serializable object to insert into this Any object

insert_Value sample code for org.omg.CORBA.Any.insert_Value(java.io.Serializable, org.omg.CORBA.TypeCode) definition code for org.omg.CORBA.Any.insert_Value(java.io.Serializable, org.omg.CORBA.TypeCode)

public abstract void insert_Value(Serializable sample code for java.io.Serializable definition code for java.io.Serializable  v,
                                  TypeCode sample code for org.omg.CORBA.TypeCode definition code for org.omg.CORBA.TypeCode  t)
                           throws MARSHAL sample code for org.omg.CORBA.MARSHAL definition code for org.omg.CORBA.MARSHAL 
Inserts the given java.io.Serializable object into this Any object's value field.

Parameters:
v - the java.io.Serializable object to insert into this Any object
t - the TypeCode object that is to be inserted into this Any object's type field and that describes the java.io.Serializable object being inserted
Throws:
MARSHAL sample code for org.omg.CORBA.MARSHAL definition code for org.omg.CORBA.MARSHAL - if the ORB has a problem marshalling or unmarshalling parameters

insert_Object sample code for org.omg.CORBA.Any.insert_Object(org.omg.CORBA.Object, org.omg.CORBA.TypeCode) definition code for org.omg.CORBA.Any.insert_Object(org.omg.CORBA.Object, org.omg.CORBA.TypeCode)

public abstract void insert_Object(Object sample code for org.omg.CORBA.Object definition code for org.omg.CORBA.Object  o,
                                   TypeCode sample code for org.omg.CORBA.TypeCode definition code for org.omg.CORBA.TypeCode  t)
                            throws BAD_PARAM sample code for org.omg.CORBA.BAD_PARAM definition code for org.omg.CORBA.BAD_PARAM 
Inserts the given org.omg.CORBA.Object object into this Any object's value field.

Parameters:
o - the org.omg.CORBA.Object instance to insert into this Any object
t - the TypeCode object that is to be inserted into this Any object and that describes the Object being inserted
Throws:
BAD_OPERATION sample code for org.omg.CORBA.BAD_OPERATION definition code for org.omg.CORBA.BAD_OPERATION - if this method is invalid for this Any object
BAD_PARAM sample code for org.omg.CORBA.BAD_PARAM definition code for org.omg.CORBA.BAD_PARAM

extract_string sample code for org.omg.CORBA.Any.extract_string() definition code for org.omg.CORBA.Any.extract_string()

public abstract String sample code for java.lang.String definition code for java.lang.String  extract_string()
                               throws BAD_OPERATION sample code for org.omg.CORBA.BAD_OPERATION definition code for org.omg.CORBA.BAD_OPERATION 
Extracts the String object in this Any object's value field.

Returns:
the String object stored in this Any object
Throws:
BAD_OPERATION sample code for org.omg.CORBA.BAD_OPERATION definition code for org.omg.CORBA.BAD_OPERATION - if this Any object contains something other than a String object or the value field has not yet been set

insert_string sample code for org.omg.CORBA.Any.insert_string(java.lang.String) definition code for org.omg.CORBA.Any.insert_string(java.lang.String)

public abstract void insert_string(String sample code for java.lang.String definition code for java.lang.String  s)
                            throws DATA_CONVERSION sample code for org.omg.CORBA.DATA_CONVERSION definition code for org.omg.CORBA.DATA_CONVERSION ,
                                   MARSHAL sample code for org.omg.CORBA.MARSHAL definition code for org.omg.CORBA.MARSHAL 
Inserts the given String object into this Any object's value field.

Parameters:
s - the String object to insert into this Any object
Throws:
DATA_CONVERSION sample code for org.omg.CORBA.DATA_CONVERSION definition code for org.omg.CORBA.DATA_CONVERSION - if there is a data conversion error
MARSHAL sample code for org.omg.CORBA.MARSHAL definition code for org.omg.CORBA.MARSHAL - if the ORB has a problem marshalling or unmarshalling parameters

extract_wstring sample code for org.omg.CORBA.Any.extract_wstring() definition code for org.omg.CORBA.Any.extract_wstring()

public abstract String sample code for java.lang.String definition code for java.lang.String  extract_wstring()
                                throws BAD_OPERATION sample code for org.omg.CORBA.BAD_OPERATION definition code for org.omg.CORBA.BAD_OPERATION 
Extracts the String object in this Any object's value field.

Returns:
the String object stored in this Any object
Throws:
BAD_OPERATION sample code for org.omg.CORBA.BAD_OPERATION definition code for org.omg.CORBA.BAD_OPERATION - if this Any object contains something other than a String object or the value field has not yet been set

insert_wstring sample code for org.omg.CORBA.Any.insert_wstring(java.lang.String) definition code for org.omg.CORBA.Any.insert_wstring(java.lang.String)

public abstract void insert_wstring(String sample code for java.lang.String definition code for java.lang.String  s)
                             throws MARSHAL sample code for org.omg.CORBA.MARSHAL definition code for org.omg.CORBA.MARSHAL 
Inserts the given String object into this Any object's value field.

Parameters:
s - the String object to insert into this Any object
Throws:
MARSHAL sample code for org.omg.CORBA.MARSHAL definition code for org.omg.CORBA.MARSHAL - if the ORB has a problem marshalling or unmarshalling parameters

extract_TypeCode sample code for org.omg.CORBA.Any.extract_TypeCode() definition code for org.omg.CORBA.Any.extract_TypeCode()

public abstract TypeCode sample code for org.omg.CORBA.TypeCode definition code for org.omg.CORBA.TypeCode  extract_TypeCode()
                                   throws BAD_OPERATION sample code for org.omg.CORBA.BAD_OPERATION definition code for org.omg.CORBA.BAD_OPERATION 
Extracts the TypeCode object in this Any object's value field.

Returns:
the TypeCode object stored in this Any object
Throws:
BAD_OPERATION sample code for org.omg.CORBA.BAD_OPERATION definition code for org.omg.CORBA.BAD_OPERATION - if this Any object contains something other than a TypeCode object or the value field has not yet been set

insert_TypeCode sample code for org.omg.CORBA.Any.insert_TypeCode(org.omg.CORBA.TypeCode) definition code for org.omg.CORBA.Any.insert_TypeCode(org.omg.CORBA.TypeCode)

public abstract void insert_TypeCode(TypeCode sample code for org.omg.CORBA.TypeCode definition code for org.omg.CORBA.TypeCode  t)
Inserts the given TypeCode object into this Any object's value field.

Parameters:
t - the TypeCode object to insert into this Any object

extract_Principal sample code for org.omg.CORBA.Any.extract_Principal() definition code for org.omg.CORBA.Any.extract_Principal()

@Deprecated
public Principal sample code for org.omg.CORBA.Principal definition code for org.omg.CORBA.Principal  extract_Principal()
                            throws BAD_OPERATION sample code for org.omg.CORBA.BAD_OPERATION definition code for org.omg.CORBA.BAD_OPERATION 
Deprecated. Deprecated by CORBA 2.2.

Extracts the Principal object in this Any object's value field. Note that the class Principal has been deprecated.

Returns:
the Principal object stored in this Any object
Throws:
BAD_OPERATION sample code for org.omg.CORBA.BAD_OPERATION definition code for org.omg.CORBA.BAD_OPERATION - if this Any object contains something other than a Principal object or the value field has not yet been set
See Also:
CORBA package comments for unimplemented features

insert_Principal sample code for org.omg.CORBA.Any.insert_Principal(org.omg.CORBA.Principal) definition code for org.omg.CORBA.Any.insert_Principal(org.omg.CORBA.Principal)

@Deprecated
public void insert_Principal(Principal sample code for org.omg.CORBA.Principal definition code for org.omg.CORBA.Principal  p)
Deprecated. Deprecated by CORBA 2.2.

Inserts the given Principal object into this Any object's value field. Note that the class Principal has been deprecated.

Parameters:
p - the Principal object to insert into this Any object
See Also:
CORBA package comments for unimplemented features

extract_Streamable sample code for org.omg.CORBA.Any.extract_Streamable() definition code for org.omg.CORBA.Any.extract_Streamable()

public Streamable sample code for org.omg.CORBA.portable.Streamable definition code for org.omg.CORBA.portable.Streamable  extract_Streamable()
                              throws BAD_INV_ORDER sample code for org.omg.CORBA.BAD_INV_ORDER definition code for org.omg.CORBA.BAD_INV_ORDER 
Extracts a Streamable from this Any object's value field. This method allows the extraction of non-primitive IDL types.

Returns:
the Streamable stored in the Any object.
Throws:
BAD_INV_ORDER sample code for org.omg.CORBA.BAD_INV_ORDER definition code for org.omg.CORBA.BAD_INV_ORDER - if the caller has invoked operations in the wrong order
See Also:
CORBA package comments for unimplemented features

insert_Streamable sample code for org.omg.CORBA.Any.insert_Streamable(org.omg.CORBA.portable.Streamable) definition code for org.omg.CORBA.Any.insert_Streamable(org.omg.CORBA.portable.Streamable)

public void insert_Streamable(Streamable sample code for org.omg.CORBA.portable.Streamable definition code for org.omg.CORBA.portable.Streamable  s)
Inserts the given Streamable object into this Any object's value field. This method allows the insertion of non-primitive IDL types.

Parameters:
s - the Streamable object to insert into this Any object; may be a non-primitive IDL type
See Also:
CORBA package comments for unimplemented features

extract_fixed sample code for org.omg.CORBA.Any.extract_fixed() definition code for org.omg.CORBA.Any.extract_fixed()

public BigDecimal sample code for java.math.BigDecimal definition code for java.math.BigDecimal  extract_fixed()
Extracts the java.math.BigDecimal object in this Any object's value field.

Returns:
the java.math.BigDecimal object stored in this Any object
Throws:
BAD_OPERATION sample code for org.omg.CORBA.BAD_OPERATION definition code for org.omg.CORBA.BAD_OPERATION - if this Any object contains something other than a java.math.BigDecimal object or the value field has not yet been set
See Also:
CORBA package comments for unimplemented features

insert_fixed sample code for org.omg.CORBA.Any.insert_fixed(java.math.BigDecimal) definition code for org.omg.CORBA.Any.insert_fixed(java.math.BigDecimal)

public void insert_fixed(BigDecimal sample code for java.math.BigDecimal definition code for java.math.BigDecimal  value)
Throws an org.omg.CORBA.NO_IMPLEMENT exception.

Inserts the given java.math.BigDecimal object into this Any object's value field.

Parameters:
value - the java.math.BigDecimal object to insert into this Any object
See Also:
CORBA package comments for unimplemented features

insert_fixed sample code for org.omg.CORBA.Any.insert_fixed(java.math.BigDecimal, org.omg.CORBA.TypeCode) definition code for org.omg.CORBA.Any.insert_fixed(java.math.BigDecimal, org.omg.CORBA.TypeCode)

public void insert_fixed(BigDecimal sample code for java.math.BigDecimal definition code for java.math.BigDecimal  value,
                         TypeCode sample code for org.omg.CORBA.TypeCode definition code for org.omg.CORBA.TypeCode  type)
                  throws BAD_INV_ORDER sample code for org.omg.CORBA.BAD_INV_ORDER definition code for org.omg.CORBA.BAD_INV_ORDER 
Throws an org.omg.CORBA.NO_IMPLEMENT exception.

Inserts the given java.math.BigDecimal object into this Any object's value field.

Parameters:
value - the java.math.BigDecimal object to insert into this Any object
type - the TypeCode object that is to be inserted into this Any object's type field and that describes the java.math.BigDecimal object being inserted
Throws:
BAD_INV_ORDER sample code for org.omg.CORBA.BAD_INV_ORDER definition code for org.omg.CORBA.BAD_INV_ORDER - if this method is invoked improperly
See Also:
CORBA package comments for unimplemented features