org.omg.CORBA.TypeCode origTC = TypeCode._OB_getOrigType(type);
switch (origTC.kind().value()) {
case org.omg.CORBA.TCKind._tk_null:
case org.omg.CORBA.TCKind._tk_void:
any_ = new Any(orbInstance_, type, null);
break;
case org.omg.CORBA.TCKind._tk_short:
case org.omg.CORBA.TCKind._tk_ushort:
case org.omg.CORBA.TCKind._tk_long:
case org.omg.CORBA.TCKind._tk_ulong:
any_ = new Any(orbInstance_, type, new Integer(0));
break;
case org.omg.CORBA.TCKind._tk_longlong:
case org.omg.CORBA.TCKind._tk_ulonglong:
any_ = new Any(orbInstance_, type, new Long(0));
break;
case org.omg.CORBA.TCKind._tk_float:
any_ = new Any(orbInstance_, type, new Float(0));
break;
case org.omg.CORBA.TCKind._tk_double:
any_ = new Any(orbInstance_, type, new Double(0));
break;
case org.omg.CORBA.TCKind._tk_boolean:
any_ = new Any(orbInstance_, type, Boolean.FALSE);
break;
case org.omg.CORBA.TCKind._tk_char:
case org.omg.CORBA.TCKind._tk_wchar:
any_ = new Any(orbInstance_, type, new Character((char) 0));
break;
case org.omg.CORBA.TCKind._tk_octet:
any_ = new Any(orbInstance_, type, new Byte((byte) 0));
break;
case org.omg.CORBA.TCKind._tk_any:
any_ = new Any(orbInstance_, type, new Any(orbInstance_));
break;
case org.omg.CORBA.TCKind._tk_TypeCode: {
org.omg.CORBA.TypeCode nullTC = org.apache.yoko.orb.OB.TypeCodeFactory
.createPrimitiveTC(org.omg.CORBA.TCKind.tk_null);
any_ = new Any(orbInstance_, type, nullTC);
break;
}
case org.omg.CORBA.TCKind._tk_objref:
case org.omg.CORBA_2_4.TCKind._tk_local_interface:
any_ = new Any(orbInstance_, type, null);
break;
case org.omg.CORBA.TCKind._tk_string:
case org.omg.CORBA.TCKind._tk_wstring:
any_ = new Any(orbInstance_, type, new String(""));
break;
case org.omg.CORBA.TCKind._tk_abstract_interface:
any_ = new Any(orbInstance_, type, null);
break;
case org.omg.CORBA.TCKind._tk_value:
//
// Only custom valuetypes are supported by DynBasic_impl
//
try {
org.apache.yoko.orb.OB.Assert
._OB_assert(origTC.type_modifier() == org.omg.CORBA.VM_CUSTOM.value);
} catch (org.omg.CORBA.TypeCodePackage.BadKind ex) {
org.apache.yoko.orb.OB.Assert._OB_assert(false);
}
any_ = new Any(orbInstance_, type, null);
break;
case org.omg.CORBA.TCKind._tk_Principal:
default:
org.apache.yoko.orb.OB.Assert._OB_assert(false);