FileDocCategorySizeDatePackage
DynAny.javaAPI DocJava SE 5 API29830Fri Aug 26 14:58:28 BST 2005org.omg.CORBA

DynAny

public interface DynAny implements org.omg.CORBA.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.
deprecated
Use the new DynAny instead

Fields Summary
Constructors Summary
Methods Summary
public voidassign(org.omg.CORBA.DynAny dyn_any)
Copy the contents from one Dynamic Any into another.

param
dyn_any the DynAny object whose contents are assigned to this DynAny.
throws
Invalid if the source DynAny is invalid

public org.omg.CORBA.DynAnycopy()
Clones this DynAny object.

return
a copy of this DynAny object

public org.omg.CORBA.DynAnycurrent_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.

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

public voiddestroy()
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.

public voidfrom_any(org.omg.CORBA.Any value)
Make a DynAny object from an Any object.

param
value the Any object.
throws
Invalid if the source Any object is empty or bad

public org.omg.CORBA.Anyget_any()
Retrieves the org.omg.CORBA.Any contained in this DynAny object.

return
the org.omg.CORBA.Any that is the value for this DynAny object
throws
org.omg.CORBA.DynAnyPackage.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

public booleanget_boolean()
Retrieves the boolean contained in this DynAny object.

return
the boolean that is the value for this DynAny object
throws
org.omg.CORBA.DynAnyPackage.TypeMismatch if the type code of the accessed component in this DynAny object is not equivalent to the type code for a boolean

public charget_char()
Retrieves the char contained in this DynAny object.

return
the char that is the value for this DynAny object
throws
org.omg.CORBA.DynAnyPackage.TypeMismatch if the type code of the accessed component in this DynAny object is not equivalent to the type code for a char

public doubleget_double()
Retrieves the double contained in this DynAny object.

return
the double that is the value for this DynAny object
throws
org.omg.CORBA.DynAnyPackage.TypeMismatch if the type code of the accessed component in this DynAny object is not equivalent to the type code for a double

public floatget_float()
Retrieves the float contained in this DynAny object.

return
the float that is the value for this DynAny object
throws
org.omg.CORBA.DynAnyPackage.TypeMismatch if the type code of the accessed component in this DynAny object is not equivalent to the type code for a float

public intget_long()
Retrieves the int contained in this DynAny object.

return
the int that is the value for this DynAny object
throws
org.omg.CORBA.DynAnyPackage.TypeMismatch if the type code of the accessed component in this DynAny object is not equivalent to the type code for a int

public longget_longlong()
Retrieves the long contained in this DynAny object.

return
the long that is the value for this DynAny object
throws
org.omg.CORBA.DynAnyPackage.TypeMismatch if the type code of the accessed component in this DynAny object is not equivalent to the type code for a long

public byteget_octet()
Retrieves the byte contained in this DynAny object.

return
the byte that is the value for this DynAny object
throws
org.omg.CORBA.DynAnyPackage.TypeMismatch if the type code of the accessed component in this DynAny object is not equivalent to the type code for a byte

public org.omg.CORBA.Objectget_reference()
Retrieves the org.omg.CORBA.Other contained in this DynAny object.

return
the org.omg.CORBA.Other that is the value for this DynAny object
throws
org.omg.CORBA.DynAnyPackage.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

public shortget_short()
Retrieves the short contained in this DynAny object.

return
the short that is the value for this DynAny object
throws
org.omg.CORBA.DynAnyPackage.TypeMismatch if the type code of the accessed component in this DynAny object is not equivalent to the type code for a short

public java.lang.Stringget_string()
Retrieves the String contained in this DynAny object.

return
the String that is the value for this DynAny object
throws
org.omg.CORBA.DynAnyPackage.TypeMismatch if the type code of the accessed component in this DynAny object is not equivalent to the type code for a String

public org.omg.CORBA.TypeCodeget_typecode()
Retrieves the org.omg.CORBA.TypeCode contained in this DynAny object.

return
the org.omg.CORBA.TypeCode that is the value for this DynAny object
throws
org.omg.CORBA.DynAnyPackage.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

public intget_ulong()
Retrieves the int contained in this DynAny object.

return
the int that is the value for this DynAny object
throws
org.omg.CORBA.DynAnyPackage.TypeMismatch if the type code of the accessed component in this DynAny object is not equivalent to the type code for a int

public longget_ulonglong()
Retrieves the long contained in this DynAny object.

return
the long that is the value for this DynAny object
throws
org.omg.CORBA.DynAnyPackage.TypeMismatch if the type code of the accessed component in this DynAny object is not equivalent to the type code for a long

public shortget_ushort()
Retrieves the short contained in this DynAny object.

return
the short that is the value for this DynAny object
throws
org.omg.CORBA.DynAnyPackage.TypeMismatch if the type code of the accessed component in this DynAny object is not equivalent to the type code for a short

public java.io.Serializableget_val()
Retrieves the java.io.Serializable object contained in this DynAny object.

return
the java.io.Serializable object that is the value for this DynAny object
throws
org.omg.CORBA.DynAnyPackage.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

public charget_wchar()
Retrieves the char contained in this DynAny object.

return
the char that is the value for this DynAny object
throws
org.omg.CORBA.DynAnyPackage.TypeMismatch if the type code of the accessed component in this DynAny object is not equivalent to the type code for a char

public java.lang.Stringget_wstring()
Retrieves the String contained in this DynAny object.

return
the String that is the value for this DynAny object
throws
org.omg.CORBA.DynAnyPackage.TypeMismatch if the type code of the accessed component in this DynAny object is not equivalent to the type code for a String

public voidinsert_any(org.omg.CORBA.Any value)
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.

param
value the org.omg.CORBA.Any object to insert into this DynAny object
throws
org.omg.CORBA.DynAnyPackage.InvalidValue if the value inserted is not consistent with the type of the accessed component in this DynAny object

public voidinsert_boolean(boolean value)
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.

param
value the boolean to insert into this DynAny object
throws
org.omg.CORBA.DynAnyPackage.InvalidValue if the value inserted is not consistent with the type of the accessed component in this DynAny object

public voidinsert_char(char value)
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.

param
value the char to insert into this DynAny object
throws
org.omg.CORBA.DynAnyPackage.InvalidValue if the value inserted is not consistent with the type of the accessed component in this DynAny object

public voidinsert_double(double value)
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.

param
value the double to insert into this DynAny object
throws
org.omg.CORBA.DynAnyPackage.InvalidValue if the value inserted is not consistent with the type of the accessed component in this DynAny object

public voidinsert_float(float value)
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.

param
value the float to insert into this DynAny object
throws
org.omg.CORBA.DynAnyPackage.InvalidValue if the value inserted is not consistent with the type of the accessed component in this DynAny object

public voidinsert_long(int value)
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.

param
value the int to insert into this DynAny object
throws
org.omg.CORBA.DynAnyPackage.InvalidValue if the value inserted is not consistent with the type of the accessed component in this DynAny object

public voidinsert_longlong(long value)
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.

param
value the long to insert into this DynAny object
throws
org.omg.CORBA.DynAnyPackage.InvalidValue if the value inserted is not consistent with the type of the accessed component in this DynAny object

public voidinsert_octet(byte value)
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.

param
value the byte to insert into this DynAny object
throws
org.omg.CORBA.DynAnyPackage.InvalidValue if the value inserted is not consistent with the type of the accessed component in this DynAny object

public voidinsert_reference(org.omg.CORBA.Object value)
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.

param
value the org.omg.CORBA.Object to insert into this DynAny object
throws
org.omg.CORBA.DynAnyPackage.InvalidValue if the value inserted is not consistent with the type of the accessed component in this DynAny object

public voidinsert_short(short value)
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.

param
value the short to insert into this DynAny object
throws
org.omg.CORBA.DynAnyPackage.InvalidValue if the value inserted is not consistent with the type of the accessed component in this DynAny object

public voidinsert_string(java.lang.String value)
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.

param
value the String to insert into this DynAny object
throws
org.omg.CORBA.DynAnyPackage.InvalidValue if the value inserted is not consistent with the type of the accessed component in this DynAny object

public voidinsert_typecode(org.omg.CORBA.TypeCode value)
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.

param
value the org.omg.CORBA.TypeCode to insert into this DynAny object
throws
org.omg.CORBA.DynAnyPackage.InvalidValue if the value inserted is not consistent with the type of the accessed component in this DynAny object

public voidinsert_ulong(int value)
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.

param
value the int to insert into this DynAny object
throws
org.omg.CORBA.DynAnyPackage.InvalidValue if the value inserted is not consistent with the type of the accessed component in this DynAny object

public voidinsert_ulonglong(long value)
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.

param
value the long to insert into this DynAny object
throws
org.omg.CORBA.DynAnyPackage.InvalidValue if the value inserted is not consistent with the type of the accessed component in this DynAny object

public voidinsert_ushort(short value)
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.

param
value the short to insert into this DynAny object
throws
org.omg.CORBA.DynAnyPackage.InvalidValue if the value inserted is not consistent with the type of the accessed component in this DynAny object

public voidinsert_val(java.io.Serializable value)
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.

param
value the java.io.Serializable object to insert into this DynAny object
throws
org.omg.CORBA.DynAnyPackage.InvalidValue if the value inserted is not consistent with the type of the accessed component in this DynAny object

public voidinsert_wchar(char value)
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.

param
value the char to insert into this DynAny object
throws
org.omg.CORBA.DynAnyPackage.InvalidValue if the value inserted is not consistent with the type of the accessed component in this DynAny object

public voidinsert_wstring(java.lang.String value)
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.

param
value the String to insert into this DynAny object
throws
org.omg.CORBA.DynAnyPackage.InvalidValue if the value inserted is not consistent with the type of the accessed component in this DynAny object

public booleannext()
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.

return
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

public voidrewind()
Moves the internal pointer to the first component.

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

param
index an int indicating the position to which the pointer should move. The first position is 0.
return
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.

public org.omg.CORBA.Anyto_any()
Convert a DynAny object to an Any object.

return
the Any object.
throws
Invalid if this DynAny is empty or bad. created or does not contain a meaningful value

public org.omg.CORBA.TypeCodetype()
Returns the TypeCode of the object inserted into this DynAny.

return
the TypeCode object.