Class DynAnyFactoryImpl

java.lang.Object
org.omg.CORBA.LocalObject
com.sun.corba.ee.impl.dynamicany.DynAnyFactoryImpl
All Implemented Interfaces:
Serializable, Object, IDLEntity, DynAnyFactory, DynAnyFactoryOperations

public class DynAnyFactoryImpl extends LocalObject implements DynAnyFactory
See Also:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      See Also:
    • orb

      private transient ORB orb
    • __ids

      private final String[] __ids
  • Constructor Details

    • DynAnyFactoryImpl

      private DynAnyFactoryImpl()
    • DynAnyFactoryImpl

      public DynAnyFactoryImpl(ORB orb)
  • Method Details

    • readObject

      private void readObject(ObjectInputStream is) throws IOException, ClassNotFoundException
      Throws:
      IOException
      ClassNotFoundException
    • create_dyn_any

      public DynAny create_dyn_any(Any any) throws InconsistentTypeCode
      Description copied from interface: DynAnyFactoryOperations
      Creates a new DynAny object from an any value. A copy of the TypeCode associated with the any value is assigned to the resulting DynAny object. The value associated with the DynAny object is a copy of the value in the original any. The current position of the created DynAny is set to zero if the passed value has components, to -1 otherwise
      Specified by:
      create_dyn_any in interface DynAnyFactoryOperations
      Parameters:
      any - value to create DynAny from
      Returns:
      resulting DynAnt
      Throws:
      InconsistentTypeCode - if value has a TypeCode with a TCKind of tk_Principal, tk_native, or tk_abstract_interface
    • create_dyn_any_from_type_code

      public DynAny create_dyn_any_from_type_code(TypeCode type) throws InconsistentTypeCode
      Description copied from interface: DynAnyFactoryOperations
      Creates a DynAny from a TypeCode. Depending on the TypeCode, the created object may be of type DynAny, or one of its derived types, such as DynStruct. The returned reference can be narrowed to the derived type. In all cases, a DynAny constructed from a TypeCode has an initial default value. The default values of basic types are:
      • false for boolean
      • zero for numeric types
      • zero for types octet, char, and wchar
      • the empty string for string and wstring
      • null for object references
      • a type code with a TCKind value of tk_null for type codes
      • for any values, an any containing a type code with a TCKind value of tk_null type and no value
      For complex types, creation of the corresponding DynAny assigns a default value as follows:
      • For DynSequence it sets the current position to -1 and creates an empty sequence.
      • For DynEnum it sets the current position to -1 and sets the value of the enumerator to the first enumerator value indicated by the TypeCode.
      • For DynFixed it sets the current position to -1 and sets the value zero.
      • For DynStruct it sets the current position to -1 for empty exceptions and to zero for all other TypeCodes. The members (if any) are (recursively) initialized to their default values.
      • For DynArray sets the current position to zero and (recursively) initializes elements to their default value.
      • For DynUnion sets the current position to zero. The discriminator value is set to a value consistent with the first named member of the union. That member is activated and (recursively) initialized to its default value.
      • For DynValue and DynValueBox it initializes to a null value.
      Specified by:
      create_dyn_any_from_type_code in interface DynAnyFactoryOperations
      Parameters:
      type - TypeCode to create from
      Returns:
      resulting DynAny
      Throws:
      InconsistentTypeCode - if the typecode is now compatible
    • _ids

      public String[] _ids()