Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
Any
. The Any
itself
allows to read, write and pass as parameter the stored value without
knowning its exact data type. The DynAny and derived classes additionally
allows to access the members of the sequence, structure, union and get the
data about enumeration, value type and CORBA fixed
without
knowing the exact type at the run time. The returned members are also
wrapped into DynAny objects, allowing them to be the nested structures.
Method Summary | |
void | |
DynAny |
|
DynAny |
|
void |
|
void | |
Any | |
boolean |
|
char |
|
double |
|
float |
|
int |
|
long |
|
byte |
|
Object |
|
short |
|
String |
|
TypeCode |
|
int |
|
long |
|
short |
|
Serializable |
|
char |
|
String |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
boolean |
|
void |
|
boolean |
|
Any | |
TypeCode |
|
Methods inherited from interface 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 |
public void assign(DynAny from) throws Invalid
Copy one DynAny into another.
- Parameters:
from
- the DynAny to copy from.
- Throws:
Invalid
- if the source DynAny is invalid.
public DynAny current_component()
Returns the focused component of this DynAny. The DynAny has the internal pointer (reference) that can point to one of its components. The returned DynAny can be used to get or set the value of the focused component. If the DynAny holds a primitive type with no components, this implementation returnsthis
.
public void destroy()
Destroys this DynAny, freeing the used resources. In java, resources are freed by the garbage collectors, so this method typically returns without action.
public Any get_any() throws TypeMismatch
Retrieves theAny
, stored inside this DynAny.
- Throws:
TypeMismatch
- if the typecode of the accessed Any is not the same as the typecode of this DynAny.
public boolean get_boolean() throws TypeMismatch
Extract the boolean value that is expected to be stored in this DynAny.
- Throws:
TypeMismatch
- if this DynAny holds the value of the different type.
public char get_char() throws TypeMismatch
Extract the char value that is expected to be stored in this DynAny.
- Throws:
TypeMismatch
- if this DynAny holds the value of the different type.
public double get_double() throws TypeMismatch
Extract thedouble
value that is expected to be stored in this DynAny.
- Throws:
TypeMismatch
- if this DynAny holds the value of the different type.
public float get_float() throws TypeMismatch
Extract thefloat
value that is expected to be stored in this DynAny.
- Throws:
TypeMismatch
- if this DynAny holds the value of the different type.
public int get_long() throws TypeMismatch
Extract the int (CORBA long) value that is expected to be stored in this DynAny.
- Throws:
TypeMismatch
- if this DynAny holds the value of the different type.
public long get_longlong() throws TypeMismatch
Extract the long (CORBA long long) value that is expected to be stored in this DynAny.
- Throws:
TypeMismatch
- if this DynAny holds the value of the different type.
public byte get_octet() throws TypeMismatch
Extract the byte (CORBA octet) value that is expected to be stored in this DynAny.
- Throws:
TypeMismatch
- if this DynAny holds the value of the different type.
public Object get_reference() throws TypeMismatch
Extract the CORBA object reference that is expected to be stored in this DynAny.
- Throws:
TypeMismatch
- if this DynAny holds the value of the different type.
public short get_short() throws TypeMismatch
Extract theshort
value that is expected to be stored in this DynAny.
- Throws:
TypeMismatch
- if this DynAny holds the value of the different type.
public String get_string() throws TypeMismatch
Extract the string value that is expected to be stored in this DynAny.
- Throws:
TypeMismatch
- if this DynAny holds the value of the different type.
public TypeCode get_typecode() throws TypeMismatch
Extract theTypeCode
value that is expected to be stored in this DynAny.
- Throws:
TypeMismatch
- if this DynAny holds the value of the different type.
public int get_ulong() throws TypeMismatch
Extract the unsigned int (CORBA ulong) value that is expected to be stored in this DynAny.
- Throws:
TypeMismatch
- if this DynAny holds the value of the different type.
public long get_ulonglong() throws TypeMismatch
Extract the unsingel long (CORBA unsigned long long )value that is expected to be stored in this DynAny.
- Throws:
TypeMismatch
- if this DynAny holds the value of the different type.
public short get_ushort() throws TypeMismatch
Extract the unsigned short value that is expected to be stored in this DynAny.
- Throws:
TypeMismatch
- if this DynAny holds the value of the different type.
public Serializable get_val() throws TypeMismatch
Extract the value that is expected to be stored in this DynAny.
- Throws:
TypeMismatch
- if this DynAny holds the value of the different type.
public char get_wchar() throws TypeMismatch
Extract the wide (usually UTF-16) character value that is expected to be stored in this DynAny.
- Throws:
TypeMismatch
- if this DynAny holds the value of the different type.
public String get_wstring() throws TypeMismatch
Extract the wide (usually UFT-16) string that is expected to be stored in this DynAny.
- Throws:
TypeMismatch
- if this DynAny holds the value of the different type.
public void insert_any(Any an_any) throws InvalidValue
- Parameters:
an_any
- the value being inserted.
- Throws:
InvalidValue
- if the value type does not match the typecode of the enclosedAny
.
public void insert_boolean(boolean a_x) throws InvalidValue
Insert the boolean value into the enclosedAny
inside this DynAny
- Parameters:
a_x
- the value being inserted.
- Throws:
InvalidValue
- if the value type does not match the typecode of the enclosedAny
.
public void insert_char(char a_x) throws InvalidValue
Insert the char value into the enclosedAny
inside this DynAny
- Parameters:
a_x
- the value being inserted.
- Throws:
InvalidValue
- if the value type does not match the typecode of the enclosedAny
.
public void insert_double(double a_x) throws InvalidValue
Insert the double value into the enclosedAny
inside this DynAny
- Parameters:
a_x
- the value being inserted.
- Throws:
InvalidValue
- if the value type does not match the typecode of the enclosedAny
.
public void insert_float(float a_x) throws InvalidValue
Insert the float value into the enclosedAny
inside this DynAny
- Parameters:
a_x
- the value being inserted.
- Throws:
InvalidValue
- if the value type does not match the typecode of the enclosedAny
.
public void insert_long(int a_x) throws InvalidValue
Insert the int (CORBA long) value into the enclosedAny
inside this DynAny
- Parameters:
a_x
- the value being inserted.
- Throws:
InvalidValue
- if the value type does not match the typecode of the enclosedAny
.
public void insert_longlong(long a_x) throws InvalidValue
Insert the long (CORBA long long) value into the enclosedAny
inside this DynAny
- Parameters:
a_x
- the value being inserted.
- Throws:
InvalidValue
- if the value type does not match the typecode of the enclosedAny
.
public void insert_octet(byte a_x) throws InvalidValue
Insert the byte (CORBA octet) value into the enclosedAny
inside this DynAny
- Parameters:
a_x
- the value being inserted.
- Throws:
InvalidValue
- if the value type does not match the typecode of the enclosedAny
.
public void insert_reference(Object a_x) throws InvalidValue
Insert the object reference into the enclosedAny
inside this DynAny
- Parameters:
a_x
- the value being inserted.
- Throws:
InvalidValue
- if the value type does not match the typecode of the enclosedAny
.
public void insert_short(short a_x) throws InvalidValue
Insert theshort
value into the enclosedAny
inside this DynAny
- Parameters:
a_x
- the value being inserted.
- Throws:
InvalidValue
- if the value type does not match the typecode of the enclosedAny
.
public void insert_string(String a_x) throws InvalidValue
Insert the string value into the enclosedAny
inside this DynAny
- Parameters:
a_x
- the value being inserted.
- Throws:
InvalidValue
- if the value type does not match the typecode of the enclosedAny
.
public void insert_typecode(TypeCode a_x) throws InvalidValue
- Parameters:
a_x
- the value being inserted.
- Throws:
InvalidValue
- if the value type does not match the typecode of the enclosedAny
.
public void insert_ulong(int a_x) throws InvalidValue
Insert the int (CORBA unsinged long) value into the enclosedAny
inside this DynAny
- Parameters:
a_x
- the value being inserted.
- Throws:
InvalidValue
- if the value type does not match the typecode of the enclosedAny
.
public void insert_ulonglong(long a_x) throws InvalidValue
Insert the long (CORBA unsigned long long) value into the enclosedAny
inside this DynAny
- Parameters:
a_x
- the value being inserted.
- Throws:
InvalidValue
- if the value type does not match the typecode of the enclosedAny
.
public void insert_ushort(short a_x) throws InvalidValue
Insert the short (CORBA unsigned short) value into the enclosedAny
inside this DynAny
- Parameters:
a_x
- the value being inserted.
- Throws:
InvalidValue
- if the value type does not match the typecode of the enclosedAny
.
public void insert_val(Serializable a_x) throws InvalidValue
Insert the value into the enclosedAny
inside this DynAny
- Parameters:
a_x
- the value being inserted.
- Throws:
InvalidValue
- if the value type does not match the typecode of the enclosedAny
.
public void insert_wchar(char a_x) throws InvalidValue
Insert the wide char (usually UTF-16) value into the enclosedAny
inside this DynAny
- Parameters:
a_x
- the value being inserted.
- Throws:
InvalidValue
- if the value type does not match the typecode of the enclosedAny
.
public void insert_wstring(String a_x) throws InvalidValue
Insert the wide string (usually UTF-16) into the enclosedAny
inside this DynAny
- Parameters:
a_x
- the value being inserted.
- Throws:
InvalidValue
- if the value type does not match the typecode of the enclosedAny
.
public boolean next()
Advances the internal pointer, described in thecurrent_component()
, one position forward.
- Returns:
- true if the pointer now points to the new component, false if there are no more components of this DynAny holds a basic type that is not divided into components.
public void rewind()
Moves the internal pointer, described in thecurrent_component()
, to the first component.
public boolean seek(int p)
Moves the internal pointer, described in thecurrent_component()
, to the given position.
- Parameters:
p
- the number of the internal component on that the internal pointer must be focused.
- Returns:
- true on success or false if there is no component with the given number. If the DynAny holds the basic type, this method returs false p values other than 0.
public TypeCode type()
Returns the typecode of the object, inserted into this DynAny.
- Returns:
- the typecode of the inserted
Any
or null typecode if nohas been yet inserted
.