Class DynEnumImpl

    • Field Detail

      • currentEnumeratorIndex

        int currentEnumeratorIndex
    • Constructor Detail

      • DynEnumImpl

        private DynEnumImpl()
      • DynEnumImpl

        protected DynEnumImpl​(ORB orb,
                              Any anAny,
                              boolean copyValue)
      • DynEnumImpl

        protected DynEnumImpl​(ORB orb,
                              TypeCode typeCode)
    • Method Detail

      • memberCount

        private int memberCount()
      • memberName

        private java.lang.String memberName​(int i)
      • computeCurrentEnumeratorIndex

        private int computeCurrentEnumeratorIndex​(java.lang.String value)
      • component_count

        public int component_count()
        Description copied from interface: DynAnyOperations
        Returns 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_count in interface DynAnyOperations
        Overrides:
        component_count in class DynAnyBasicImpl
        Returns:
        the number of components
      • current_component

        public DynAny current_component()
                                 throws TypeMismatch
        Description copied from interface: DynAnyOperations
        Returns 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_component in interface DynAnyOperations
        Overrides:
        current_component in class DynAnyBasicImpl
        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

        public java.lang.String get_as_string()
        Description copied from interface: DynEnumOperations
        Returns the value of the DynEnum as an IDL identifier.
        Specified by:
        get_as_string in interface DynEnumOperations
        Returns:
        the value of the DynEnum
      • set_as_string

        public void set_as_string​(java.lang.String value)
                           throws InvalidValue
        Description copied from interface: DynEnumOperations
        Sets the value of the DynEnum to the enumerated value whose IDL identifier is passed in the value parameter.
        Specified by:
        set_as_string in interface DynEnumOperations
        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: DynEnumOperations
        Returns 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_ulong in interface DynEnumOperations
        Returns:
        the value of the DynEnum
      • set_as_ulong

        public void set_as_ulong​(int value)
                          throws InvalidValue
        Description copied from interface: DynEnumOperations
        Sets the value of the DynEnum as the enumerated value's ordinal value.
        Specified by:
        set_as_ulong in interface DynEnumOperations
        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