/** * 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_float(float value) throws TypeMismatch { checkDestroyed (); org.omg.CORBA.Any any = getRepresentation(); if( any.type().kind() != org.omg.CORBA.TCKind.tk_float) { throw new TypeMismatch (); } any.insert_float(value); }
public void insert_float(float 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_float) throw new TypeMismatch(); any.insert_float(value); }
break; case TCKind._tk_float: result.insert_float(new Float(value).floatValue()); break; case TCKind._tk_double:
break; case TCKind._tk_float: any.insert_float((Float)value); break; case TCKind._tk_double:
break; case TCKind._tk_float: a.insert_float((Float)primitive.getValue()); break; case TCKind._tk_double:
case TCKind._tk_float: returnValue.insert_float((float)0.0); break; case TCKind._tk_double:
tagValue.insert_float(value); dst.write_float(value); break;
tagValue.insert_float(value); dst.write_float(value); break;
break; case TCKind._tk_float: _any.insert_float(0); break; case TCKind._tk_char:
tagValue.insert_float(value); dst.write_float(value); break;