Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
public interface DynAnyOperations
DynAny
.
Method Summary | |
void | |
int |
|
DynAny |
|
DynAny |
|
void |
|
boolean | |
void | |
Any |
|
boolean |
|
char |
|
double |
|
DynAny |
|
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 |
|
void |
|
boolean |
|
void |
|
boolean |
|
Any | |
TypeCode |
|
public void assign(DynAny from) throws TypeMismatch
Initialises the value of this DynAny with the value, stored inside the passed DynAny, making a shallow copy.
- Parameters:
from
- the DynAny to copy from.
- Throws:
TypeMismatch
- if the source DynAny is invalid.
public int component_count()
Get the number number of fields in the enclosed structure or number of memebers in the enclosed array, sequence, enumeration, etc. This method only counts elements at the top level. For instance, if invoked on a DynStruct with a single member, it returns 1, irrespective of the type of the member.
- Returns:
- number of components or 0 if the enclosed Any is not divideable.
public DynAny current_component() throws TypeMismatch
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 returnsnull
.
- Throws:
TypeMismatch
- if called on DynAny that cannot have active components, likeDynEnum
.
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 void from_any(Any an_any) throws TypeMismatch, InvalidValue
Makes a DynAny from theAny
. The passedAny
becomes the enclosed instance of this DynAny, allowing to change/traverse theAny
fields by theDynAny
methods.
- Throws:
TypeMismatch
- if the type of this DynAny differs from the type of the passed Any. The DynAny cannot be reused with the enclosed type different from that it was initially created.InvalidValue
- if the value, stored in the passed parameter, is otherwise invalid.
public Any get_any() throws TypeMismatch, InvalidValue
This method is used when the wrapped Any contains an instance of another Any itself. The method returns this second enclosed Any.
- 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, InvalidValue
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, InvalidValue
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, InvalidValue
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 DynAny get_dyn_any() throws TypeMismatch, InvalidValue
Return DynAny, wrapping the second (enclosed any) that is stored in the wrapped Any.
- Throws:
TypeMismatch
- if the wrapped Any does not store another Any.InvalidValue
- if the current position points nowhere.
public float get_float() throws TypeMismatch, InvalidValue
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, InvalidValue
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, InvalidValue
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, InvalidValue
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, InvalidValue
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, InvalidValue
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, InvalidValue
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, InvalidValue
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, InvalidValue
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, InvalidValue
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, InvalidValue
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, InvalidValue
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, InvalidValue
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, InvalidValue
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 TypeMismatch, 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, TypeMismatch
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, TypeMismatch
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, TypeMismatch
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_dyn_any(DynAny insert_it) throws TypeMismatch, InvalidValue
Insert a value at the current position.
- Parameters:
insert_it
- a value to insert.
- Throws:
TypeMismatch
- if the component at the current position has a different type.InvalidValue
- if the current position points nowhere.
public void insert_float(float a_x) throws InvalidValue, TypeMismatch
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, TypeMismatch
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, TypeMismatch
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, TypeMismatch
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, TypeMismatch
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, TypeMismatch
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, TypeMismatch
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, TypeMismatch
- 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, TypeMismatch
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, TypeMismatch
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, TypeMismatch
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, TypeMismatch
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, TypeMismatch
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, TypeMismatch
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 Any to_any()
Returns a shallow copy of the enclosedAny
,
- Returns:
- shallow copy of the enclosed
Any
.
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
.