Class DynEnumImpl

All Implemented Interfaces:
Serializable, Object, IDLEntity, DynAny, DynAnyOperations, DynEnum, DynEnumOperations

public class DynEnumImpl extends DynAnyBasicImpl implements DynEnum
See Also:
  • Field Details

  • Constructor Details

    • DynEnumImpl

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

      protected DynEnumImpl(ORB orb, TypeCode typeCode)
  • Method Details

    • 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
    • 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
      Throws:
      TypeMismatch
    • get_as_string

      public 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
    • set_as_string

      public void set_as_string(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
      Throws:
      InvalidValue
    • 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
    • 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
      Throws:
      InvalidValue
    • factory

      protected DynAnyFactory factory()
    • getAny

      protected Any getAny()
    • getAny

      protected Any getAny(DynAny dynAny)
    • writeAny

      protected void writeAny(OutputStream out)
    • setStatus

      protected void setStatus(byte newStatus)
    • clearData

      protected void clearData()
    • type

      public TypeCode type()
      Description copied from interface: DynAnyOperations
      Returns the TypeCode associated with this DynAny object. A DynAny object is created with a TypeCode value assigned to it. This TypeCode value determines the type of the value handled through the DynAny object. Note that the TypeCode associated with a DynAny object is initialized at the time the DynAny is created and cannot be changed during lifetime of the DynAny object.
      Specified by:
      type in interface DynAnyOperations
      Returns:
      The TypeCode associated with this DynAny object
    • _ids

      public String[] _ids()