Exemplo n.º 1
0
  /**
   * 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.
   *
   * @exception TypeMismatch If called on a DynAny that cannot have components, such as a DynEnum or
   *     an empty exception
   */
  public org.omg.DynamicAny.DynAny current_component()
      throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch {
    org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke("current_component", _opsClass);
    DynFixedOperations $self = (DynFixedOperations) $so.servant;

    try {
      return $self.current_component();
    } finally {
      _servant_postinvoke($so);
    }
  } // current_component