本文整理汇总了Java中com.sun.corba.se.spi.orb.ORB.get_primitive_tc方法的典型用法代码示例。如果您正苦于以下问题:Java ORB.get_primitive_tc方法的具体用法?Java ORB.get_primitive_tc怎么用?Java ORB.get_primitive_tc使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.sun.corba.se.spi.orb.ORB
的用法示例。
在下文中一共展示了ORB.get_primitive_tc方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: AnyImpl
import com.sun.corba.se.spi.orb.ORB; //导入方法依赖的package包/类
/**
* A constructor that sets the Any to contain a null. It also marks
* the value as being invalid so that extractions throw an exception
* until an insertion has been performed.
*/
public AnyImpl(ORB orb)
{
this.orb = orb;
wrapper = ORBUtilSystemException.get( (com.sun.corba.se.spi.orb.ORB)orb,
CORBALogDomains.RPC_PRESENTATION ) ;
typeCode = orb.get_primitive_tc(TCKind._tk_null);
stream = null;
object = null;
value = 0;
// null is a valid value
isInitialized = true;
}
示例2: systemExceptionMembers
import com.sun.corba.se.spi.orb.ORB; //导入方法依赖的package包/类
private static StructMember[] systemExceptionMembers (ORB orb) {
if (members == null) {
members = new StructMember[3];
members[0] = new StructMember("id", orb.create_string_tc(0), null);
members[1] = new StructMember("minor", orb.get_primitive_tc(TCKind.tk_long), null);
members[2] = new StructMember("completed", orb.get_primitive_tc(TCKind.tk_long), null);
}
return members;
}
示例3: getPrimitiveTypeCodeForClass
import com.sun.corba.se.spi.orb.ORB; //导入方法依赖的package包/类
/**
* It looks like this was copied from io.ValueUtility at some
* point.
*
* It's used by createTypeCodeForClass. The tcORB passed in
* should have the desired ORB version, and is used to
* create the type codes.
*/
private TypeCode getPrimitiveTypeCodeForClass (Class c, ORB tcORB)
{
//debug.log ("getPrimitiveTypeCodeForClass");
if (c == Integer.TYPE) {
return tcORB.get_primitive_tc (TCKind.tk_long);
} else if (c == Byte.TYPE) {
return tcORB.get_primitive_tc (TCKind.tk_octet);
} else if (c == Long.TYPE) {
return tcORB.get_primitive_tc (TCKind.tk_longlong);
} else if (c == Float.TYPE) {
return tcORB.get_primitive_tc (TCKind.tk_float);
} else if (c == Double.TYPE) {
return tcORB.get_primitive_tc (TCKind.tk_double);
} else if (c == Short.TYPE) {
return tcORB.get_primitive_tc (TCKind.tk_short);
} else if (c == Character.TYPE) {
// For Merlin or later JDKs, or for foreign ORBs,
// we correctly say that a Java char maps to a
// CORBA wchar. For backwards compatibility
// with our older ORBs, we say it maps to a
// CORBA char. This is only used in RMI-IIOP
// in our javax.rmi.CORBA.Util delegate's
// writeAny method. In Java IDL, there's no way
// to know the ORB version that the Any will be
// sent out with -- it could be different than
// the one used to create the Any -- so we use the
// most recent version (see insert_Value).
if (ORBVersionFactory.getFOREIGN().compareTo(tcORB.getORBVersion()) == 0 ||
ORBVersionFactory.getNEWER().compareTo(tcORB.getORBVersion()) <= 0)
return tcORB.get_primitive_tc(TCKind.tk_wchar);
else
return tcORB.get_primitive_tc(TCKind.tk_char);
} else if (c == Boolean.TYPE) {
return tcORB.get_primitive_tc (TCKind.tk_boolean);
} else {
// _REVISIT_ Not sure if this is right.
return tcORB.get_primitive_tc (TCKind.tk_any);
}
}