|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface DynUnionOperations
DynUnion objects support the manipulation of IDL unions. A union can have only two valid current positions:
Method Summary | |
---|---|
TCKind |
discriminator_kind()
Returns the TCKind value of the discriminators TypeCode. |
DynAny |
get_discriminator()
Returns the current discriminator value. |
boolean |
has_no_active_member()
Returns true if the union has no active member, that is, the unions value consists solely of its discriminator because the discriminator has a value that is not listed as an explicit case label. |
TCKind |
member_kind()
Returns the TCKind value of the currently active members TypeCode. |
String |
member_name()
Returns the name of the currently active member. |
DynAny |
member()
Returns the currently active member. |
void |
set_discriminator(DynAny d)
Sets the discriminator of the DynUnion to the specified value. |
void |
set_to_default_member()
Sets the discriminator to a value that is consistent with the value of the default case of a union. |
void |
set_to_no_active_member()
Sets the discriminator to a value that does not correspond to any of the unions case labels. |
Methods inherited from interface org.omg.DynamicAny.DynAnyOperations |
---|
assign, component_count, copy, current_component, destroy, equal, from_any, get_any, get_boolean, get_char, get_double, get_dyn_any, get_float, get_long, get_longlong, get_octet, get_reference, get_short, get_string, get_typecode, get_ulong, get_ulonglong, get_ushort, get_val, get_wchar, get_wstring, insert_any, insert_boolean, insert_char, insert_double, insert_dyn_any, insert_float, insert_long, insert_longlong, insert_octet, insert_reference, insert_short, insert_string, insert_typecode, insert_ulong, insert_ulonglong, insert_ushort, insert_val, insert_wchar, insert_wstring, next, rewind, seek, to_any, type |
Method Detail |
---|
DynAny get_discriminator()
void set_discriminator(DynAny d) throws TypeMismatch
TypeMismatch
- if the TypeCode of the parameter is not equivalent to the TypeCode
of the union's discriminatorvoid set_to_default_member() throws TypeMismatch
TypeMismatch
- if the union does not have an explicit default casevoid set_to_no_active_member() throws TypeMismatch
TypeMismatch
- if the union has an explicit default case or if it uses the entire range
of discriminator values for explicit case labelsboolean has_no_active_member()
TCKind discriminator_kind()
TCKind member_kind() throws InvalidValue
InvalidValue
- if the union does not have a currently active memberDynAny member() throws InvalidValue
InvalidValue
- if the union has no active memberString member_name() throws InvalidValue
InvalidValue
- if the union has no active member
|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright 2004 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.