本文整理汇总了Java中org.omg.CORBA.TCKind._tk_short方法的典型用法代码示例。如果您正苦于以下问题:Java TCKind._tk_short方法的具体用法?Java TCKind._tk_short怎么用?Java TCKind._tk_short使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.omg.CORBA.TCKind
的用法示例。
在下文中一共展示了TCKind._tk_short方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: insert_short
import org.omg.CORBA.TCKind; //导入方法依赖的package包/类
public void insert_short(short 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_short)
throw new TypeMismatch();
any.insert_short(value);
}
示例2: get_short
import org.omg.CORBA.TCKind; //导入方法依赖的package包/类
public short get_short()
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_short)
throw new TypeMismatch();
return any.extract_short();
}
示例3: ORB
import org.omg.CORBA.TCKind; //导入方法依赖的package包/类
protected ORB()
{
// Initialize logging first, since it is needed nearly
// everywhere (for example, in TypeCodeImpl).
wrapperMap = new ConcurrentHashMap();
wrapper = ORBUtilSystemException.get( this,
CORBALogDomains.RPC_PRESENTATION ) ;
omgWrapper = OMGSystemException.get( this,
CORBALogDomains.RPC_PRESENTATION ) ;
typeCodeMap = new HashMap();
primitiveTypeCodeConstants = new TypeCodeImpl[] {
new TypeCodeImpl(this, TCKind._tk_null),
new TypeCodeImpl(this, TCKind._tk_void),
new TypeCodeImpl(this, TCKind._tk_short),
new TypeCodeImpl(this, TCKind._tk_long),
new TypeCodeImpl(this, TCKind._tk_ushort),
new TypeCodeImpl(this, TCKind._tk_ulong),
new TypeCodeImpl(this, TCKind._tk_float),
new TypeCodeImpl(this, TCKind._tk_double),
new TypeCodeImpl(this, TCKind._tk_boolean),
new TypeCodeImpl(this, TCKind._tk_char),
new TypeCodeImpl(this, TCKind._tk_octet),
new TypeCodeImpl(this, TCKind._tk_any),
new TypeCodeImpl(this, TCKind._tk_TypeCode),
new TypeCodeImpl(this, TCKind._tk_Principal),
new TypeCodeImpl(this, TCKind._tk_objref),
null, // tk_struct
null, // tk_union
null, // tk_enum
new TypeCodeImpl(this, TCKind._tk_string),
null, // tk_sequence
null, // tk_array
null, // tk_alias
null, // tk_except
new TypeCodeImpl(this, TCKind._tk_longlong),
new TypeCodeImpl(this, TCKind._tk_ulonglong),
new TypeCodeImpl(this, TCKind._tk_longdouble),
new TypeCodeImpl(this, TCKind._tk_wchar),
new TypeCodeImpl(this, TCKind._tk_wstring),
new TypeCodeImpl(this, TCKind._tk_fixed),
new TypeCodeImpl(this, TCKind._tk_value),
new TypeCodeImpl(this, TCKind._tk_value_box),
new TypeCodeImpl(this, TCKind._tk_native),
new TypeCodeImpl(this, TCKind._tk_abstract_interface)
} ;
monitoringManager =
MonitoringFactories.getMonitoringManagerFactory( ).
createMonitoringManager(
MonitoringConstants.DEFAULT_MONITORING_ROOT,
MonitoringConstants.DEFAULT_MONITORING_ROOT_DESCRIPTION);
}
示例4: inputRemoteMembersForReadFields
import org.omg.CORBA.TCKind; //导入方法依赖的package包/类
private final void inputRemoteMembersForReadFields(java.util.Map fieldToValueMap)
throws InvalidClassException, StreamCorruptedException,
ClassNotFoundException, IOException {
// Must have this local variable since defaultReadObjectFVDMembers
// may get mangled by recursion.
ValueMember fields[] = defaultReadObjectFVDMembers;
try {
for (int i = 0; i < fields.length; i++) {
switch (fields[i].type.kind().value()) {
case TCKind._tk_octet:
byte byteValue = orbStream.read_octet();
fieldToValueMap.put(fields[i].name, new Byte(byteValue));
break;
case TCKind._tk_boolean:
boolean booleanValue = orbStream.read_boolean();
fieldToValueMap.put(fields[i].name, new Boolean(booleanValue));
break;
case TCKind._tk_char:
// Backwards compatibility. Older Sun ORBs sent
// _tk_char even though they read and wrote wchars
// correctly.
//
// Fall through to the _tk_wchar case.
case TCKind._tk_wchar:
char charValue = orbStream.read_wchar();
fieldToValueMap.put(fields[i].name, new Character(charValue));
break;
case TCKind._tk_short:
short shortValue = orbStream.read_short();
fieldToValueMap.put(fields[i].name, new Short(shortValue));
break;
case TCKind._tk_long:
int intValue = orbStream.read_long();
fieldToValueMap.put(fields[i].name, new Integer(intValue));
break;
case TCKind._tk_longlong:
long longValue = orbStream.read_longlong();
fieldToValueMap.put(fields[i].name, new Long(longValue));
break;
case TCKind._tk_float:
float floatValue = orbStream.read_float();
fieldToValueMap.put(fields[i].name, new Float(floatValue));
break;
case TCKind._tk_double:
double doubleValue = orbStream.read_double();
fieldToValueMap.put(fields[i].name, new Double(doubleValue));
break;
case TCKind._tk_value:
case TCKind._tk_objref:
case TCKind._tk_value_box:
Object objectValue = null;
try {
objectValue = inputObjectField(fields[i],
cbSender);
} catch (IndirectionException cdrie) {
// The CDR stream had never seen the given offset before,
// so check the recursion manager (it will throw an
// IOException if it doesn't have a reference, either).
objectValue = activeRecursionMgr.getObject(cdrie.offset);
}
fieldToValueMap.put(fields[i].name, objectValue);
break;
default:
// XXX I18N, logging needed.
throw new StreamCorruptedException("Unknown kind: "
+ fields[i].type.kind().value());
}
}
} catch (Throwable t) {
StreamCorruptedException result = new StreamCorruptedException(t.getMessage());
result.initCause(t);
throw result;
}
}
示例5: ORB
import org.omg.CORBA.TCKind; //导入方法依赖的package包/类
protected ORB()
{
// Initialize logging first, since it is needed nearly
// everywhere (for example, in TypeCodeImpl).
wrapperMap = new ConcurrentHashMap<>();
wrapper = ORBUtilSystemException.get( this,
CORBALogDomains.RPC_PRESENTATION ) ;
omgWrapper = OMGSystemException.get( this,
CORBALogDomains.RPC_PRESENTATION ) ;
typeCodeMap = new HashMap<>();
primitiveTypeCodeConstants = new TypeCodeImpl[] {
new TypeCodeImpl(this, TCKind._tk_null),
new TypeCodeImpl(this, TCKind._tk_void),
new TypeCodeImpl(this, TCKind._tk_short),
new TypeCodeImpl(this, TCKind._tk_long),
new TypeCodeImpl(this, TCKind._tk_ushort),
new TypeCodeImpl(this, TCKind._tk_ulong),
new TypeCodeImpl(this, TCKind._tk_float),
new TypeCodeImpl(this, TCKind._tk_double),
new TypeCodeImpl(this, TCKind._tk_boolean),
new TypeCodeImpl(this, TCKind._tk_char),
new TypeCodeImpl(this, TCKind._tk_octet),
new TypeCodeImpl(this, TCKind._tk_any),
new TypeCodeImpl(this, TCKind._tk_TypeCode),
new TypeCodeImpl(this, TCKind._tk_Principal),
new TypeCodeImpl(this, TCKind._tk_objref),
null, // tk_struct
null, // tk_union
null, // tk_enum
new TypeCodeImpl(this, TCKind._tk_string),
null, // tk_sequence
null, // tk_array
null, // tk_alias
null, // tk_except
new TypeCodeImpl(this, TCKind._tk_longlong),
new TypeCodeImpl(this, TCKind._tk_ulonglong),
new TypeCodeImpl(this, TCKind._tk_longdouble),
new TypeCodeImpl(this, TCKind._tk_wchar),
new TypeCodeImpl(this, TCKind._tk_wstring),
new TypeCodeImpl(this, TCKind._tk_fixed),
new TypeCodeImpl(this, TCKind._tk_value),
new TypeCodeImpl(this, TCKind._tk_value_box),
new TypeCodeImpl(this, TCKind._tk_native),
new TypeCodeImpl(this, TCKind._tk_abstract_interface)
} ;
monitoringManager =
MonitoringFactories.getMonitoringManagerFactory( ).
createMonitoringManager(
MonitoringConstants.DEFAULT_MONITORING_ROOT,
MonitoringConstants.DEFAULT_MONITORING_ROOT_DESCRIPTION);
}