本文整理了Java中org.omg.CORBA.Any.insert_wchar()
方法的一些代码示例,展示了Any.insert_wchar()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Any.insert_wchar()
方法的具体详情如下:
包路径:org.omg.CORBA.Any
类名称:Any
方法名:insert_wchar
暂无
代码示例来源: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.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_wchar(char value)
throws TypeMismatch
{
checkDestroyed ();
org.omg.CORBA.Any any = getRepresentation();
if( any.type().kind() != org.omg.CORBA.TCKind.tk_wchar)
{
throw new TypeMismatch ();
}
any.insert_wchar(value);
}
代码示例来源:origin: org.jboss.openjdk-orb/openjdk-orb
public void insert_wchar(char 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_wchar)
throw new TypeMismatch();
any.insert_wchar(value);
}
代码示例来源:origin: org.jacorb/jacorb
break;
case TCKind._tk_wchar:
result.insert_wchar(value.charAt(0));
break;
case TCKind._tk_wstring:
代码示例来源:origin: apache/cxf
break;
case TCKind._tk_wchar:
any.insert_wchar(((Character)value).charValue());
break;
case TCKind._tk_octet:
代码示例来源:origin: apache/cxf
break;
case TCKind._tk_wchar:
a.insert_wchar((Character)primitive.getValue());
break;
case TCKind._tk_octet:
代码示例来源:origin: org.jboss.openjdk-orb/openjdk-orb
case TCKind._tk_wchar:
returnValue.insert_wchar((char)0);
break;
case TCKind._tk_string:
代码示例来源:origin: org.jboss.spec.javax.rmi/jboss-rmi-api_1.0_spec
tagValue.insert_wchar(value);
dst.write_wchar(value);
break;
代码示例来源:origin: org.jboss.openjdk-orb/openjdk-orb
tagValue.insert_wchar(value);
dst.write_wchar(value);
break;
代码示例来源:origin: jboss/jboss-javaee-specs
tagValue.insert_wchar(value);
dst.write_wchar(value);
break;
代码示例来源:origin: org.jacorb/jacorb
break;
case TCKind._tk_wchar:
_any.insert_wchar((char)0);
break;
case TCKind._tk_octet:
内容来源于网络,如有侵权,请联系作者删除!