本文整理了Java中org.omg.CORBA.Any.insert_boolean()
方法的一些代码示例,展示了Any.insert_boolean()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Any.insert_boolean()
方法的具体详情如下:
包路径:org.omg.CORBA.Any
类名称:Any
方法名:insert_boolean
暂无
代码示例来源:origin: wildfly/wildfly
/**
* 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());
}
代码示例来源:origin: org.jacorb/jacorb-services
public DefaultETCLEvaluator(ORB orb, Configuration config, DynAnyFactory dynAnyFactory)
{
orb_ = orb;
logger_ = ((org.jacorb.config.Configuration) config).getLogger(getClass().getName());
dynAnyFactory_ = dynAnyFactory;
TRUE_ANY = orb_.create_any();
FALSE_ANY = orb_.create_any();
TRUE_ANY.insert_boolean(true);
FALSE_ANY.insert_boolean(false);
}
代码示例来源:origin: org.jboss.eap/wildfly-iiop-openjdk
/**
* 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());
}
代码示例来源:origin: org.wildfly/wildfly-iiop-openjdk
/**
* 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());
}
代码示例来源:origin: org.jacorb/jacorb
public void insert_boolean( boolean value )
throws TypeMismatch
{
checkDestroyed ();
org.omg.CORBA.Any any = getRepresentation();
if( any.type().kind() != org.omg.CORBA.TCKind.tk_boolean)
{
throw new TypeMismatch ();
}
any.insert_boolean(value);
}
代码示例来源:origin: org.jacorb/jacorb-services
public TypedProxyPullSupplierImpl(ITypedAdmin admin, ConsumerAdmin consumerAdmin, ORB orb,
POA poa, Configuration conf, TaskProcessor taskProcessor, OfferManager offerManager,
SubscriptionManager subscriptionManager, DynAnyFactory dynAnyFactory,
Repository repository) throws ConfigurationException
{
super(admin, orb, poa, conf, taskProcessor, offerManager,
subscriptionManager, consumerAdmin);
trueAny_ = orb.create_any();
falseAny_ = orb.create_any();
trueAny_.insert_boolean(true);
falseAny_.insert_boolean(false);
supportedInterface_ = admin.getSupportedInterface();
dynAnyFactory_ = dynAnyFactory;
repository_ = repository;
qosSettings_.addPropertySetListener(
new String[] { OrderPolicy.value, DiscardPolicy.value }, reconfigureEventQueues_);
try
{
FullInterfaceDescription interfaceDescription = getInterfaceDescription();
validateInterface(interfaceDescription);
messageQueueMap_ = Collections
.unmodifiableMap(newMessageQueueMap(interfaceDescription));
invalidResponses_ = Collections
.unmodifiableMap(newInvalidResponseMap(interfaceDescription));
} catch (InconsistentTypeCode e)
{
throw new RuntimeException();
}
}
代码示例来源:origin: org.jboss.openjdk-orb/openjdk-orb
public void insert_boolean(boolean 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_boolean)
throw new TypeMismatch();
any.insert_boolean(value);
}
代码示例来源:origin: org.jacorb/jacorb
break;
case TCKind._tk_boolean:
result.insert_boolean(new Boolean(value).booleanValue());
break;
case TCKind._tk_char:
代码示例来源:origin: org.glassfish.main.transaction/jts
public static void setOrb(ORB orb) {
txOrb = orb;
Any any = txOrb.create_any();
any.insert_boolean(false);
nullContext = new PropagationContext(
0,
new TransIdentity(null, null, new otid_t(0, 0, new byte[0])),
new TransIdentity[0],
any);
any.insert_boolean(true);
dummyContext = new PropagationContext(
-1,
new TransIdentity(null, null, new otid_t(-1, 0, new byte[0])),
new TransIdentity[0],
any);
try {
rfm = (ReferenceFactoryManager)orb.resolve_initial_references(
ORBConstants.REFERENCE_FACTORY_MANAGER ) ;
} catch (Exception ex) {
_logger.log(Level.WARNING,ex.getMessage(), ex);
}
}
代码示例来源:origin: apache/cxf
switch (this.typeCode.kind().value()) {
case TCKind._tk_boolean:
any.insert_boolean((Boolean)value);
break;
case TCKind._tk_char:
代码示例来源:origin: apache/cxf
break;
case TCKind._tk_boolean:
member.label.insert_boolean(Boolean.parseBoolean(cs.getLabel()));
break;
case TCKind._tk_enum:
代码示例来源:origin: org.glassfish.main.transaction/jts
emptyData.insert_boolean(false);
代码示例来源:origin: org.glassfish.main.transaction/jts
ORB orb = Configuration.getORB();
emptyContext.implementation_specific_data = orb.create_any();
emptyContext.implementation_specific_data.insert_boolean(false);
代码示例来源:origin: org.jacorb/jacorb-services
equalsIgnoreCase("on");
_isStartTimeSupportedDefault.insert_boolean(_isStartTimeSupported);
Default.DEFAULT_STOP_TIME_SUPPORTED).
equalsIgnoreCase("on");
_isStopTimeSupportedDefault.insert_boolean(_isStopTimeSupported);
代码示例来源:origin: org.glassfish.main.transaction/jts
emptyData.insert_boolean(false);
代码示例来源:origin: org.jacorb/jacorb-services
_rejectNewEventsAny.insert_boolean(_rejectNewEvents);
代码示例来源:origin: apache/cxf
switch (primitive.getTypeCode().kind().value()) {
case TCKind._tk_boolean:
a.insert_boolean((Boolean)primitive.getValue());
break;
case TCKind._tk_char:
代码示例来源:origin: org.jboss.openjdk-orb/openjdk-orb
org.omg.CosNaming.BindingHelper.insert(_b, b.value);
org.omg.CORBA.Any __result = _orb().create_any();
__result.insert_boolean(___result);
r.result(__result);
org.omg.CosNaming.BindingListHelper.insert(_bl, bl.value);
org.omg.CORBA.Any __result = _orb().create_any();
__result.insert_boolean(___result);
r.result(__result);
代码示例来源:origin: org.jboss.openjdk-orb/openjdk-orb
case TCKind._tk_boolean:
returnValue.insert_boolean(false);
break;
case TCKind._tk_short:
代码示例来源:origin: org.jacorb/jacorb
_any.insert_boolean(false);
break;
case TCKind._tk_short:
内容来源于网络,如有侵权,请联系作者删除!