This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.


org.omg.CORBA
interface DynAny

All Superinterfaces:
Object
All Known Subinterfaces:
DynArray, DynEnum, DynFixed, DynSequence, DynStruct, DynUnion, DynValue

public interface DynAny
extends Object

Enables org.omg.CORBA.Any values to be dynamically interpreted (traversed) and constructed. A DynAny object is associated with a data value which may correspond to a copy of the value inserted into an Any. The DynAny APIs enable traversal of the data value associated with an Any at runtime and extraction of the primitive constituents of the data value.


Method Summary
 void
assign(DynAny dyn_any)

          Copy the contents from one Dynamic Any into another.
 DynAny

          Clones this DynAny object.
 DynAny

          Returns a DynAny object reference that can be used to get/set the value of the component currently accessed.
 void

          Destroys this DynAny object and frees any resources used to represent the data value associated with it.
 void
from_any(Any value)

          Make a DynAny object from an Any object.
 Any

          Retrieves the org.omg.CORBA.Any contained in this DynAny object.
 boolean

          Retrieves the boolean contained in this DynAny object.
 char

          Retrieves the char contained in this DynAny object.
 double

          Retrieves the double contained in this DynAny object.
 float

          Retrieves the float contained in this DynAny object.
 int

          Retrieves the int contained in this DynAny object.
 long

          Retrieves the long contained in this DynAny object.
 byte

          Retrieves the byte contained in this DynAny object.
 Object

          Retrieves the org.omg.CORBA.Other contained in this DynAny object.
 short

          Retrieves the short contained in this DynAny object.
 String

          Retrieves the String contained in this DynAny object.
 TypeCode

          Retrieves the org.omg.CORBA.TypeCode contained in this DynAny object.
 int

          Retrieves the int contained in this DynAny object.
 long

          Retrieves the long contained in this DynAny object.
 short

          Retrieves the short contained in this DynAny object.
 Serializable

          Retrieves the java.io.Serializable object contained in this DynAny object.
 char

          Retrieves the char contained in this DynAny object.
 String

          Retrieves the String contained in this DynAny object.
 void
insert_any(Any value)

          Inserts the given org.omg.CORBA.Any object as the value for this DynAny object.
 void
insert_boolean(boolean value)

          Inserts the given boolean as the value for this DynAny object.
 void
insert_char(char value)

          Inserts the given char as the value for this DynAny object.
 void
insert_double(double value)

          Inserts the given double as the value for this DynAny object.
 void
insert_float(float value)

          Inserts the given float as the value for this DynAny object.
 void
insert_long(int value)

          Inserts the given int as the value for this DynAny object.
 void
insert_longlong(long value)

          Inserts the given long as the value for this DynAny object.
 void
insert_octet(byte value)

          Inserts the given byte as the value for this DynAny object.
 void

          Inserts the given org.omg.CORBA.Object as the value for this DynAny object.
 void
insert_short(short value)

          Inserts the given short as the value for this DynAny object.
 void

          Inserts the given String object as the value for this DynAny object.
 void

          Inserts the given org.omg.CORBA.TypeCode as the value for this DynAny object.
 void
insert_ulong(int value)

          Inserts the given int as the value for this DynAny object.
 void
insert_ulonglong(long value)

          Inserts the given long as the value for this DynAny object.
 void
insert_ushort(short value)

          Inserts the given short as the value for this DynAny object.
 void

          Inserts the given java.io.Serializable object as the value for this DynAny object.
 void
insert_wchar(char value)

          Inserts the given char as the value for this DynAny object.
 void

          Inserts the given String as the value for this DynAny object.
 boolean

          Moves to the next component of this DynAny object.
 void

          Moves the internal pointer to the first component.
 boolean
seek(int index)

          Moves the internal pointer to the given index.
 Any

          Convert a DynAny object to an Any object.
 TypeCode

          Returns the TypeCode of the object inserted into this DynAny.
 
Methods inherited from class org.omg.CORBA.Object
_create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override
 

Method Detail

assign

public void assign(DynAny dyn_any)
            throws Invalid
Copy the contents from one Dynamic Any into another.

Parameters:
dyn_any - the DynAny object whose contents are assigned to this DynAny.
Throws:
Invalid

copy

public DynAny copy()
Clones this DynAny object.

Returns:
a copy of this DynAny object

current_component

public DynAny current_component()
Returns a DynAny object reference that can be used to get/set the value of the component currently accessed. The appropriate insert method can be called on the resulting DynAny object to initialize the component. The appropriate get method can be called on the resulting DynAny object to extract the value of the component.

Returns:
a DynAny object reference that can be used to retrieve or set the value of the component currently accessed

destroy

public void destroy()
Destroys this DynAny object and frees any resources used to represent the data value associated with it. This method also destroys all DynAny objects obtained from it.

Destruction of DynAny objects should be handled with care, taking into account issues dealing with the representation of data values associated with DynAny objects. A programmer who wants to destroy a DynAny object but still be able to manipulate some component of the data value associated with it, should first create a DynAny object for the component and then make a copy of the created DynAny object.


from_any

public void from_any(Any value)
              throws Invalid
Make a DynAny object from an Any object.

Parameters:
value - the Any object.
Throws:
Invalid

get_any

public Any get_any()
            throws TypeMismatch
Retrieves the org.omg.CORBA.Any contained in this DynAny object.

Returns:
the org.omg.CORBA.Any that is the value for this DynAny object
Throws:
TypeMismatch - if the type code of the accessed component in this DynAny object is not equivalent to the type code for an org.omg.CORBA.Any

get_boolean

public boolean get_boolean()
                    throws TypeMismatch
Retrieves the boolean contained in this DynAny object.

Returns:
the boolean that is the value for this DynAny object
Throws:
TypeMismatch - if the type code of the accessed component in this DynAny object is not equivalent to the type code for a boolean

get_char

public char get_char()
              throws TypeMismatch
Retrieves the char contained in this DynAny object.

Returns:
the char that is the value for this DynAny object
Throws:
TypeMismatch - if the type code of the accessed component in this DynAny object is not equivalent to the type code for a char

get_double

public double get_double()
                  throws TypeMismatch
Retrieves the double contained in this DynAny object.

Returns:
the double that is the value for this DynAny object
Throws:
TypeMismatch - if the type code of the accessed component in this DynAny object is not equivalent to the type code for a double

get_float

public float get_float()
                throws TypeMismatch
Retrieves the float contained in this DynAny object.

Returns:
the float that is the value for this DynAny object
Throws:
TypeMismatch - if the type code of the accessed component in this DynAny object is not equivalent to the type code for a float

get_long

public int get_long()
             throws TypeMismatch
Retrieves the int contained in this DynAny object.

Returns:
the int that is the value for this DynAny object
Throws:
TypeMismatch - if the type code of the accessed component in this DynAny object is not equivalent to the type code for a int

get_longlong

public long get_longlong()
                  throws TypeMismatch
Retrieves the long contained in this DynAny object.

Returns:
the long that is the value for this DynAny object
Throws:
TypeMismatch - if the type code of the accessed component in this DynAny object is not equivalent to the type code for a long

get_octet

public byte get_octet()
               throws TypeMismatch
Retrieves the byte contained in this DynAny object.

Returns:
the byte that is the value for this DynAny object
Throws:
TypeMismatch - if the type code of the accessed component in this DynAny object is not equivalent to the type code for a byte

get_reference

public Object get_reference()
                     throws TypeMismatch
Retrieves the org.omg.CORBA.Other contained in this DynAny object.

Returns:
the org.omg.CORBA.Other that is the value for this DynAny object
Throws:
TypeMismatch - if the type code of the accessed component in this DynAny object is not equivalent to the type code for an org.omg.CORBA.Other

get_short

public short get_short()
                throws TypeMismatch
Retrieves the short contained in this DynAny object.

Returns:
the short that is the value for this DynAny object
Throws:
TypeMismatch - if the type code of the accessed component in this DynAny object is not equivalent to the type code for a short

get_string

public String get_string()
                  throws TypeMismatch
Retrieves the String contained in this DynAny object.

Returns:
the String that is the value for this DynAny object
Throws:
TypeMismatch - if the type code of the accessed component in this DynAny object is not equivalent to the type code for a String

get_typecode

public TypeCode get_typecode()
                      throws TypeMismatch
Retrieves the org.omg.CORBA.TypeCode contained in this DynAny object.

Returns:
the org.omg.CORBA.TypeCode that is the value for this DynAny object
Throws:
TypeMismatch - if the type code of the accessed component in this DynAny object is not equivalent to the type code for a org.omg.CORBA.TypeCode

get_ulong

public int get_ulong()
              throws TypeMismatch
Retrieves the int contained in this DynAny object.

Returns:
the int that is the value for this DynAny object
Throws:
TypeMismatch - if the type code of the accessed component in this DynAny object is not equivalent to the type code for a int

get_ulonglong

public long get_ulonglong()
                   throws TypeMismatch
Retrieves the long contained in this DynAny object.

Returns:
the long that is the value for this DynAny object
Throws:
TypeMismatch - if the type code of the accessed component in this DynAny object is not equivalent to the type code for a long

get_ushort

public short get_ushort()
                 throws TypeMismatch
Retrieves the short contained in this DynAny object.

Returns:
the short that is the value for this DynAny object
Throws:
TypeMismatch - if the type code of the accessed component in this DynAny object is not equivalent to the type code for a short

get_val

public Serializable get_val()
                     throws TypeMismatch
Retrieves the java.io.Serializable object contained in this DynAny object.

Returns:
the java.io.Serializable object that is the value for this DynAny object
Throws:
TypeMismatch - if the type code of the accessed component in this DynAny object is not equivalent to the type code for a java.io.Serializable object

get_wchar

public char get_wchar()
               throws TypeMismatch
Retrieves the char contained in this DynAny object.

Returns:
the char that is the value for this DynAny object
Throws:
TypeMismatch - if the type code of the accessed component in this DynAny object is not equivalent to the type code for a char

get_wstring

public String get_wstring()
                   throws TypeMismatch
Retrieves the String contained in this DynAny object.

Returns:
the String that is the value for this DynAny object
Throws:
TypeMismatch - if the type code of the accessed component in this DynAny object is not equivalent to the type code for a String

insert_any

public void insert_any(Any value)
                throws InvalidValue
Inserts the given org.omg.CORBA.Any object as the value for this DynAny object.

If this method is called on a constructed DynAny object, it initializes the next component of the constructed data value associated with this DynAny object.

Parameters:
value - the org.omg.CORBA.Any object to insert into this DynAny object
Throws:
InvalidValue - if the value inserted is not consistent with the type of the accessed component in this DynAny object

insert_boolean

public void insert_boolean(boolean value)
                    throws InvalidValue
Inserts the given boolean as the value for this DynAny object.

If this method is called on a constructed DynAny object, it initializes the next component of the constructed data value associated with this DynAny object.

Parameters:
value - the boolean to insert into this DynAny object
Throws:
InvalidValue - if the value inserted is not consistent with the type of the accessed component in this DynAny object

insert_char

public void insert_char(char value)
                 throws InvalidValue
Inserts the given char as the value for this DynAny object.

If this method is called on a constructed DynAny object, it initializes the next component of the constructed data value associated with this DynAny object.

Parameters:
value - the char to insert into this DynAny object
Throws:
InvalidValue - if the value inserted is not consistent with the type of the accessed component in this DynAny object

insert_double

public void insert_double(double value)
                   throws InvalidValue
Inserts the given double as the value for this DynAny object.

If this method is called on a constructed DynAny object, it initializes the next component of the constructed data value associated with this DynAny object.

Parameters:
value - the double to insert into this DynAny object
Throws:
InvalidValue - if the value inserted is not consistent with the type of the accessed component in this DynAny object

insert_float

public void insert_float(float value)
                  throws InvalidValue
Inserts the given float as the value for this DynAny object.

If this method is called on a constructed DynAny object, it initializes the next component of the constructed data value associated with this DynAny object.

Parameters:
value - the float to insert into this DynAny object
Throws:
InvalidValue - if the value inserted is not consistent with the type of the accessed component in this DynAny object

insert_long

public void insert_long(int value)
                 throws InvalidValue
Inserts the given int as the value for this DynAny object.

If this method is called on a constructed DynAny object, it initializes the next component of the constructed data value associated with this DynAny object.

Parameters:
value - the int to insert into this DynAny object
Throws:
InvalidValue - if the value inserted is not consistent with the type of the accessed component in this DynAny object

insert_longlong

public void insert_longlong(long value)
                     throws InvalidValue
Inserts the given long as the value for this DynAny object.

If this method is called on a constructed DynAny object, it initializes the next component of the constructed data value associated with this DynAny object.

Parameters:
value - the long to insert into this DynAny object
Throws:
InvalidValue - if the value inserted is not consistent with the type of the accessed component in this DynAny object

insert_octet

public void insert_octet(byte value)
                  throws InvalidValue
Inserts the given byte as the value for this DynAny object.

If this method is called on a constructed DynAny object, it initializes the next component of the constructed data value associated with this DynAny object.

Parameters:
value - the byte to insert into this DynAny object
Throws:
InvalidValue - if the value inserted is not consistent with the type of the accessed component in this DynAny object

insert_reference

public void insert_reference(Object value)
                      throws InvalidValue
Inserts the given org.omg.CORBA.Object as the value for this DynAny object.

If this method is called on a constructed DynAny object, it initializes the next component of the constructed data value associated with this DynAny object.

Parameters:
value - the org.omg.CORBA.Object to insert into this DynAny object
Throws:
InvalidValue - if the value inserted is not consistent with the type of the accessed component in this DynAny object

insert_short

public void insert_short(short value)
                  throws InvalidValue
Inserts the given short as the value for this DynAny object.

If this method is called on a constructed DynAny object, it initializes the next component of the constructed data value associated with this DynAny object.

Parameters:
value - the short to insert into this DynAny object
Throws:
InvalidValue - if the value inserted is not consistent with the type of the accessed component in this DynAny object

insert_string

public void insert_string(String value)
                   throws InvalidValue
Inserts the given String object as the value for this DynAny object.

If this method is called on a constructed DynAny object, it initializes the next component of the constructed data value associated with this DynAny object.

Parameters:
value - the String to insert into this DynAny object
Throws:
InvalidValue - if the value inserted is not consistent with the type of the accessed component in this DynAny object

insert_typecode

public void insert_typecode(TypeCode value)
                     throws InvalidValue
Inserts the given org.omg.CORBA.TypeCode as the value for this DynAny object.

If this method is called on a constructed DynAny object, it initializes the next component of the constructed data value associated with this DynAny object.

Parameters:
value - the org.omg.CORBA.TypeCode to insert into this DynAny object
Throws:
InvalidValue - if the value inserted is not consistent with the type of the accessed component in this DynAny object

insert_ulong

public void insert_ulong(int value)
                  throws InvalidValue
Inserts the given int as the value for this DynAny object.

If this method is called on a constructed DynAny object, it initializes the next component of the constructed data value associated with this DynAny object.

Parameters:
value - the int to insert into this DynAny object
Throws:
InvalidValue - if the value inserted is not consistent with the type of the accessed component in this DynAny object

insert_ulonglong

public void insert_ulonglong(long value)
                      throws InvalidValue
Inserts the given long as the value for this DynAny object.

If this method is called on a constructed DynAny object, it initializes the next component of the constructed data value associated with this DynAny object.

Parameters:
value - the long to insert into this DynAny object
Throws:
InvalidValue - if the value inserted is not consistent with the type of the accessed component in this DynAny object

insert_ushort

public void insert_ushort(short value)
                   throws InvalidValue
Inserts the given short as the value for this DynAny object.

If this method is called on a constructed DynAny object, it initializes the next component of the constructed data value associated with this DynAny object.

Parameters:
value - the short to insert into this DynAny object
Throws:
InvalidValue - if the value inserted is not consistent with the type of the accessed component in this DynAny object

insert_val

public void insert_val(Serializable value)
                throws InvalidValue
Inserts the given java.io.Serializable object as the value for this DynAny object.

If this method is called on a constructed DynAny object, it initializes the next component of the constructed data value associated with this DynAny object.

Parameters:
value - the java.io.Serializable object to insert into this DynAny object
Throws:
InvalidValue - if the value inserted is not consistent with the type of the accessed component in this DynAny object

insert_wchar

public void insert_wchar(char value)
                  throws InvalidValue
Inserts the given char as the value for this DynAny object.

If this method is called on a constructed DynAny object, it initializes the next component of the constructed data value associated with this DynAny object.

Parameters:
value - the char to insert into this DynAny object
Throws:
InvalidValue - if the value inserted is not consistent with the type of the accessed component in this DynAny object

insert_wstring

public void insert_wstring(String value)
                    throws InvalidValue
Inserts the given String as the value for this DynAny object.

If this method is called on a constructed DynAny object, it initializes the next component of the constructed data value associated with this DynAny object.

Parameters:
value - the String to insert into this DynAny object
Throws:
InvalidValue - if the value inserted is not consistent with the type of the accessed component in this DynAny object

next

public boolean next()
Moves to the next component of this DynAny object. This method is used for iterating through the components of a constructed type, effectively moving a pointer from one component to the next. The pointer starts out on the first component when a DynAny object is created.

Returns:
true if the pointer points to a component; false if there are no more components or this DynAny is associated with a basic type rather than a constructed type

rewind

public void rewind()
Moves the internal pointer to the first component.


seek

public boolean seek(int index)
Moves the internal pointer to the given index. Logically, this method sets a new offset for this pointer.

Parameters:
index - an int indicating the position to which the pointer should move. The first position is 0.
Returns:
true if the pointer points to a component; false if there is no component at the designated index. If this DynAny object is associated with a basic type, this method returns false for any index other than 0.

to_any

public Any to_any()
           throws Invalid
Convert a DynAny object to an Any object.

Returns:
the Any object.
Throws:
Invalid

type

public TypeCode type()
Returns the TypeCode of the object inserted into this DynAny.

Returns:
the TypeCode object.


This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.
This page displays the Jadeite version of the documention, which is derived from the offical documentation that contains this copyright notice:
Copyright 2008 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.
The official Sun™ documentation can be found here at http://java.sun.com/javase/6/docs/api/.