/** * 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()); }
protected DynEnumImpl(ORB orb, TypeCode typeCode) { super(orb, typeCode); index = NO_INDEX; currentEnumeratorIndex = 0; any.insert_long(0); }
public static void insert (org.omg.CORBA.Any any, int s) { any.insert_long(s); }
public static void insert (org.omg.CORBA.Any any, int s) { any.insert_long(s); }
public static void insert (org.omg.CORBA.Any any, int s) { any.insert_long(s); }
public static void insert (org.omg.CORBA.Any any, int s) { any.insert_long(s); }
public static void insert (org.omg.CORBA.Any any, int s) { any.insert_long(s); }
public static void insert (org.omg.CORBA.Any any, int s) { any.insert_long(s); }
public static void insert (org.omg.CORBA.Any any, int s) { any.insert_long(s); }
public static void insert (org.omg.CORBA.Any any, int s) { any.insert_long(s); }
public static void insert (org.omg.CORBA.Any any, int s) { any.insert_long(s); }
public static void insert (org.omg.CORBA.Any any, int s) { any.insert_long(s); }
public static void insert (org.omg.CORBA.Any any, int s) { any.insert_long(s); }
public static void insert (org.omg.CORBA.Any any, int s) { any.insert_long(s); }
public void set_as_string (String value) throws org.omg.DynamicAny.DynAnyPackage.InvalidValue { if (status == STATUS_DESTROYED) { throw wrapper.dynAnyDestroyed() ; } int newIndex = computeCurrentEnumeratorIndex(value); if (newIndex == NO_INDEX) { throw new InvalidValue(); } currentEnumeratorIndex = newIndex; any.insert_long(newIndex); }
public void set_as_ulong (int value) throws org.omg.DynamicAny.DynAnyPackage.InvalidValue { if (status == STATUS_DESTROYED) { throw wrapper.dynAnyDestroyed() ; } if (value < 0 || value >= memberCount()) { throw new InvalidValue(); } currentEnumeratorIndex = value; any.insert_long(value); } }
protected DynEnumImpl(ORB orb, Any anAny, boolean copyValue) { super(orb, anAny, copyValue); index = NO_INDEX; // The any doesn't have to be initialized. We have a default value in this case. try { currentEnumeratorIndex = any.extract_long(); } catch (BAD_OPERATION e) { // _REVISIT_: Fix Me currentEnumeratorIndex = 0; any.type(any.type()); any.insert_long(0); } }
/** * @jmx.managed-attribute access = "read-write" */ public void setMaxEventsPerConsumer(int max) { final Any any = getORB().create_any(); any.insert_long(max); final Property prop = new Property(MaxEventsPerConsumer.value, any); qosSettings_.set_qos(new Property[] { prop }); }
public void insert_long(int value) throws TypeMismatch { checkDestroyed (); org.omg.CORBA.Any any = getRepresentation(); if( any.type().kind() != org.omg.CORBA.TCKind.tk_long) { throw new TypeMismatch (); } any.insert_long(value); }
public void insert_long(int 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_long) throw new TypeMismatch(); any.insert_long(value); }