Class DynEnumImpl
java.lang.Object
org.omg.CORBA.LocalObject
com.sun.corba.ee.impl.dynamicany.DynAnyImpl
com.sun.corba.ee.impl.dynamicany.DynAnyBasicImpl
com.sun.corba.ee.impl.dynamicany.DynEnumImpl
- All Implemented Interfaces:
Serializable, Object, IDLEntity, DynAny, DynAnyOperations, DynEnum, DynEnumOperations
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) intprivate static final longFields inherited from class DynAnyImpl
any, index, NO_INDEX, orb, status, STATUS_DESTROYABLE, STATUS_DESTROYED, STATUS_UNDESTROYABLE, wrapper -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateprotectedDynEnumImpl(ORB orb, Any anAny, boolean copyValue) protectedDynEnumImpl(ORB orb, TypeCode typeCode) -
Method Summary
Modifier and TypeMethodDescriptionintReturns the number of components of a DynAny.private intReturns the DynAny for the component at the current position.Returns the value of the DynEnum as an IDL identifier.intReturns the value of the DynEnum as the enumerated value's ordinal value.private intprivate StringmemberName(int i) voidset_as_string(String value) Sets the value of the DynEnum to the enumerated value whose IDL identifier is passed in the value parameter.voidset_as_ulong(int value) Sets the value of the DynEnum as the enumerated value's ordinal value.Methods inherited from class DynAnyBasicImpl
assign, copy, 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_anyMethods inherited from class DynAnyImpl
_ids, clearData, factory, getAny, getAny, setStatus, type, writeAnyMethods inherited from class 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_connectionMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface DynAnyOperations
assign, copy, 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, typeMethods inherited from interface 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
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
currentEnumeratorIndex
int currentEnumeratorIndex
-
-
Constructor Details
-
DynEnumImpl
private DynEnumImpl() -
DynEnumImpl
-
DynEnumImpl
-
-
Method Details
-
memberCount
private int memberCount() -
memberName
-
computeCurrentEnumeratorIndex
-
component_count
public int component_count()Description copied from interface:DynAnyOperationsReturns the number of components of a DynAny. For a DynAny without components, it returns zero. The operation only counts the components at the top level. For example, if component_count is invoked on a DynStruct with a single member, the return value is 1, irrespective of the type of the member.- For sequences, the operation returns the current number of elements.
- For structures, exceptions, and value types, the operation returns the number of members.
- For arrays, the operation returns the number of elements.
- For unions, the operation returns 2 if the discriminator indicates that a named member is active, otherwise, it returns 1.
- For DynFixed and DynEnum, the operation returns zero.
- Specified by:
component_countin interfaceDynAnyOperations- Overrides:
component_countin classDynAnyBasicImpl- Returns:
- the number of components
-
current_component
Description copied from interface:DynAnyOperationsReturns the DynAny for the component at the current position. It does not advance the current position, so repeated calls to current_component without an intervening call to rewind, next, or seek return the same component. The returned DynAny object reference can be used to get/set the value of the current component. If the current component represents a complex type, the returned reference can be narrowed based on the TypeCode to get the interface corresponding to the to the complex type. Calling current_component on a DynAny that cannot have components, such as a DynEnum or an empty exception, raises TypeMismatch. Calling current_component on a DynAny whose current position is -1 returns a nil reference. The iteration operations, together with current_component, can be used to dynamically compose an any value. After creating a dynamic any, such as a DynStruct, current_component and next can be used to initialize all the components of the value. Once the dynamic value is completely initialized, to_any creates the corresponding any value.- Specified by:
current_componentin interfaceDynAnyOperations- Overrides:
current_componentin classDynAnyBasicImpl- Returns:
- the DynAny at the current position
- Throws:
TypeMismatch- If called on a DynAny that cannot have components, such as a DynEnum or an empty exception
-
get_as_string
Description copied from interface:DynEnumOperationsReturns the value of the DynEnum as an IDL identifier.- Specified by:
get_as_stringin interfaceDynEnumOperations- Returns:
- the value of the DynEnum
-
set_as_string
Description copied from interface:DynEnumOperationsSets the value of the DynEnum to the enumerated value whose IDL identifier is passed in the value parameter.- Specified by:
set_as_stringin interfaceDynEnumOperations- Parameters:
value- the new enum value- Throws:
InvalidValue- If value contains a string that is not a valid IDL identifier for the corresponding enumerated type
-
get_as_ulong
public int get_as_ulong()Description copied from interface:DynEnumOperationsReturns the value of the DynEnum as the enumerated value's ordinal value. Enumerators have ordinal values 0 to n-1, as they appear from left to right in the corresponding IDL definition.- Specified by:
get_as_ulongin interfaceDynEnumOperations- Returns:
- the value of the DynEnum
-
set_as_ulong
Description copied from interface:DynEnumOperationsSets the value of the DynEnum as the enumerated value's ordinal value.- Specified by:
set_as_ulongin interfaceDynEnumOperations- Parameters:
value- the new ordinal value- Throws:
InvalidValue- If value contains a value that is outside the range of ordinal values for the corresponding enumerated type
-