/** * Insert a java primitive into an Any. * The primitive is assumed to be wrapped in one of the primitive * wrapper classes. */ public static void insertAnyPrimitive(Any any, Object primitive) { Class type = primitive.getClass(); if (type == Boolean.class) any.insert_boolean(((Boolean) primitive).booleanValue()); else if (type == Character.class) any.insert_wchar(((Character) primitive).charValue()); else if (type == Byte.class) any.insert_octet(((Byte) primitive).byteValue()); else if (type == Short.class) any.insert_short(((Short) primitive).shortValue()); else if (type == Integer.class) any.insert_long(((Integer) primitive).intValue()); else if (type == Long.class) any.insert_longlong(((Long) primitive).longValue()); else if (type == Float.class) any.insert_float(((Float) primitive).floatValue()); else if (type == Double.class) any.insert_double(((Double) primitive).doubleValue()); else throw IIOPLogger.ROOT_LOGGER.notAPrimitive(type.getName()); }
/** * Insert a java primitive into an Any. * The primitive is assumed to be wrapped in one of the primitive * wrapper classes. */ public static void insertAnyPrimitive(Any any, Object primitive) { Class type = primitive.getClass(); if (type == Boolean.class) any.insert_boolean(((Boolean) primitive).booleanValue()); else if (type == Character.class) any.insert_wchar(((Character) primitive).charValue()); else if (type == Byte.class) any.insert_octet(((Byte) primitive).byteValue()); else if (type == Short.class) any.insert_short(((Short) primitive).shortValue()); else if (type == Integer.class) any.insert_long(((Integer) primitive).intValue()); else if (type == Long.class) any.insert_longlong(((Long) primitive).longValue()); else if (type == Float.class) any.insert_float(((Float) primitive).floatValue()); else if (type == Double.class) any.insert_double(((Double) primitive).doubleValue()); else throw IIOPLogger.ROOT_LOGGER.notAPrimitive(type.getName()); }
/** * Insert a java primitive into an Any. * The primitive is assumed to be wrapped in one of the primitive * wrapper classes. */ public static void insertAnyPrimitive(Any any, Object primitive) { Class type = primitive.getClass(); if (type == Boolean.class) any.insert_boolean(((Boolean) primitive).booleanValue()); else if (type == Character.class) any.insert_wchar(((Character) primitive).charValue()); else if (type == Byte.class) any.insert_octet(((Byte) primitive).byteValue()); else if (type == Short.class) any.insert_short(((Short) primitive).shortValue()); else if (type == Integer.class) any.insert_long(((Integer) primitive).intValue()); else if (type == Long.class) any.insert_longlong(((Long) primitive).longValue()); else if (type == Float.class) any.insert_float(((Float) primitive).floatValue()); else if (type == Double.class) any.insert_double(((Double) primitive).doubleValue()); else throw IIOPLogger.ROOT_LOGGER.notAPrimitive(type.getName()); }
public void insert_double(double value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue { if (status == STATUS_DESTROYED) { throw wrapper.dynAnyDestroyed() ; } if (any.type().kind().value() != TCKind._tk_double) throw new TypeMismatch(); any.insert_double(value); }
public void insert_double(double value) throws TypeMismatch { checkDestroyed (); org.omg.CORBA.Any any = getRepresentation(); if( any.type().kind() != org.omg.CORBA.TCKind.tk_double) { throw new TypeMismatch (); } any.insert_double(value); }
break; case TCKind._tk_double: result.insert_double(new Double(value).doubleValue()); break; case TCKind._tk_boolean:
break; case TCKind._tk_double: any.insert_double((Double)value); break; case TCKind._tk_string:
_any.insert_double(discriminator); break;
break; case TCKind._tk_double: a.insert_double((Double)primitive.getValue()); break; case TCKind._tk_string:
case TCKind._tk_double: returnValue.insert_double((double)0.0); break; case TCKind._tk_octet:
tagValue.insert_double(value); dst.write_double(value); break;
tagValue.insert_double(value); dst.write_double(value); break;
break; case TCKind._tk_double: _any.insert_double( 0 ); break; case TCKind._tk_ulong:
tagValue.insert_double(value); dst.write_double(value); break;