public interface DynUnionOperations extends DynAnyOperations
Modifier and Type | Method and Description |
---|---|
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.
|
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
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 Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2022, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.