Package com.sun.corba.ee.impl.dynamicany
Class DynUnionImpl
java.lang.Object
org.omg.CORBA.LocalObject
com.sun.corba.ee.impl.dynamicany.DynAnyImpl
com.sun.corba.ee.impl.dynamicany.DynAnyConstructedImpl
com.sun.corba.ee.impl.dynamicany.DynUnionImpl
- All Implemented Interfaces:
Serializable
,Object
,IDLEntity
,DynAny
,DynAnyOperations
,DynUnion
,DynUnionOperations
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) DynAny
(package private) int
(package private) DynAny
private static final long
Fields inherited from class com.sun.corba.ee.impl.dynamicany.DynAnyConstructedImpl
components, emptyComponents, isRecursive, RECURSIVE_NO, RECURSIVE_UNDEF, RECURSIVE_YES, REPRESENTATION_ANY, REPRESENTATION_COMPONENTS, REPRESENTATION_NONE, REPRESENTATION_TYPECODE, representations
Fields inherited from class com.sun.corba.ee.impl.dynamicany.DynAnyImpl
any, index, NO_INDEX, orb, status, STATUS_DESTROYABLE, STATUS_DESTROYED, STATUS_UNDESTROYABLE, wrapper
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
DynUnionImpl
(ORB orb, Any any, boolean copyValue) protected
DynUnionImpl
(ORB orb, TypeCode typeCode) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
private int
currentUnionMemberIndex
(Any discriminatorValue) private int
Returns the TCKind value of the discriminator's TypeCode.private TypeCode
Returns the current discriminator value.boolean
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.protected boolean
protected boolean
member()
Returns the currently active member.Returns the TCKind value of the currently active members TypeCode.Returns the name of the currently active member.private int
private Any
memberLabel
(int i) private String
memberName
(int i) private TypeCode
memberType
(int i) void
set_discriminator
(DynAny newDiscriminator) Sets the discriminator of the DynUnion to the specified value.void
Sets the discriminator to a value that is consistent with the value of the default case of a union.void
Sets the discriminator to a value that does not correspond to any of the unions case labels.Methods inherited from class com.sun.corba.ee.impl.dynamicany.DynAnyConstructedImpl
assign, checkInitAny, checkInitComponents, 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, initializeAnyFromComponents, 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, isRecursive, next, rewind, seek, to_any, writeAny
Methods inherited from class com.sun.corba.ee.impl.dynamicany.DynAnyImpl
_ids, factory, getAny, getAny, setStatus, type
Methods inherited from class org.omg.CORBA.LocalObject
_create_request, _create_request, _duplicate, _get_domain_managers, _get_interface, _get_interface_def, _get_policy, _hash, _invoke, _is_a, _is_equivalent, _is_local, _non_existent, _orb, _release, _releaseReply, _request, _request, _servant_postinvoke, _servant_preinvoke, _set_policy_override, validate_connection
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
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
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
-
Field Details
-
Constructor Details
-
DynUnionImpl
-
DynUnionImpl
-
-
Method Details
-
initializeComponentsFromAny
protected boolean initializeComponentsFromAny()- Specified by:
initializeComponentsFromAny
in classDynAnyConstructedImpl
-
initializeComponentsFromTypeCode
protected boolean initializeComponentsFromTypeCode()- Specified by:
initializeComponentsFromTypeCode
in classDynAnyConstructedImpl
-
discriminatorType
-
memberCount
private int memberCount() -
memberLabel
-
memberType
-
memberName
-
defaultIndex
private int defaultIndex() -
currentUnionMemberIndex
-
clearData
protected void clearData()- Overrides:
clearData
in classDynAnyConstructedImpl
-
get_discriminator
Returns the current discriminator value.- Specified by:
get_discriminator
in interfaceDynUnionOperations
- Returns:
- current discriminator value.
-
set_discriminator
Description copied from interface:DynUnionOperations
Sets the discriminator of the DynUnion to the specified value. Setting the discriminator to a value that is consistent with the currently active union member does not affect the currently active member. Setting the discriminator to a value that is inconsistent with the currently active member deactivates the member and activates the member that is consistent with the new discriminator value (if there is a member for that value) by initializing the member to its default value. Setting the discriminator of a union sets the current position to 0 if the discriminator value indicates a non-existent union member (has_no_active_member returns true in this case). Otherwise, if the discriminator value indicates a named union member, the current position is set to 1 (has_no_active_member returns false and component_count returns 2 in this case).- Specified by:
set_discriminator
in interfaceDynUnionOperations
- Parameters:
newDiscriminator
- the discriminator of the union- Throws:
TypeMismatch
- if the TypeCode of the parameter is not equivalent to the TypeCode of the union???s discriminator
-
set_to_default_member
Description copied from interface:DynUnionOperations
Sets the discriminator to a value that is consistent with the value of the default case of a union. It sets the current position to zero and causes component_count to return 2.- Specified by:
set_to_default_member
in interfaceDynUnionOperations
- Throws:
TypeMismatch
- if the union does not have an explicit default case
-
set_to_no_active_member
Description copied from interface:DynUnionOperations
Sets the discriminator to a value that does not correspond to any of the unions case labels. It sets the current position to zero and causes component_count to return 1.- Specified by:
set_to_no_active_member
in interfaceDynUnionOperations
- Throws:
TypeMismatch
- if the union has an explicit default case or if it uses the entire range of discriminator values for explicit case labels
-
has_no_active_member
public boolean has_no_active_member()Description copied from interface:DynUnionOperations
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. Calling this operation on a union that has a default case returns false. Calling this operation on a union that uses the entire range of discriminator values for explicit case labels returns false.- Specified by:
has_no_active_member
in interfaceDynUnionOperations
- Returns:
- if there is no active member
-
discriminator_kind
Description copied from interface:DynUnionOperations
Returns the TCKind value of the discriminator's TypeCode.- Specified by:
discriminator_kind
in interfaceDynUnionOperations
- Returns:
- the TCKing of the discriminator
-
member
Description copied from interface:DynUnionOperations
Returns the currently active member. Note that the returned reference remains valid only for as long as the currently active member does not change. Using the returned reference beyond the life time of the currently active member raises OBJECT_NOT_EXIST.- Specified by:
member
in interfaceDynUnionOperations
- Returns:
- the currently active member
- Throws:
InvalidValue
- if the union has no active member
-
member_name
Description copied from interface:DynUnionOperations
Returns the name of the currently active member. If the unions TypeCode does not contain a member name for the currently active member, the operation returns an empty string.- Specified by:
member_name
in interfaceDynUnionOperations
- Returns:
- the name of the member
- Throws:
InvalidValue
- if the union has no active member
-
member_kind
Description copied from interface:DynUnionOperations
Returns the TCKind value of the currently active members TypeCode.- Specified by:
member_kind
in interfaceDynUnionOperations
- Returns:
- the TCKind
- Throws:
InvalidValue
- if the union does not have a currently active member
-