本文整理汇总了Java中org.omg.CORBA.TCKind._tk_value_box方法的典型用法代码示例。如果您正苦于以下问题:Java TCKind._tk_value_box方法的具体用法?Java TCKind._tk_value_box怎么用?Java TCKind._tk_value_box使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.omg.CORBA.TCKind
的用法示例。
在下文中一共展示了TCKind._tk_value_box方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: TypeCodeImpl
import org.omg.CORBA.TCKind; //导入方法依赖的package包/类
public TypeCodeImpl(ORB orb,
int creationKind,
String id,
String name,
TypeCode original_type)
// for aliases and value boxes
{
this(orb) ;
if ( creationKind == TCKind._tk_alias || creationKind == TCKind._tk_value_box )
{
_kind = creationKind;
setId(id);
_name = name;
_contentType = convertToNative(_orb, original_type);
}
// else initializes to null
}
示例2: id
import org.omg.CORBA.TCKind; //导入方法依赖的package包/类
public String id()
throws BadKind
{
switch (_kind) {
case tk_indirect:
//return indirectType().id(); // same as _id
case TCKind._tk_except:
case TCKind._tk_objref:
case TCKind._tk_struct:
case TCKind._tk_union:
case TCKind._tk_enum:
case TCKind._tk_alias:
case TCKind._tk_value:
case TCKind._tk_value_box:
case TCKind._tk_native:
case TCKind._tk_abstract_interface:
// exception and objref typecodes must have a repository id.
// structs, unions, enums, and aliases may or may not.
return _id;
default:
// all other typecodes throw the BadKind exception.
throw new BadKind();
}
}
示例3: content_type
import org.omg.CORBA.TCKind; //导入方法依赖的package包/类
public TypeCode content_type()
throws BadKind
{
switch (_kind) {
case tk_indirect:
return indirectType().content_type();
case TCKind._tk_sequence:
return lazy_content_type();
case TCKind._tk_array:
case TCKind._tk_alias:
case TCKind._tk_value_box:
return _contentType;
default:
throw new BadKind();
}
}
示例4: getSignature
import org.omg.CORBA.TCKind; //导入方法依赖的package包/类
public static String getSignature(ValueMember member)
throws ClassNotFoundException {
// REVISIT. Can the type be something that is
// non-primitive yet not a value_box, value, or objref?
// If so, should use ObjectStreamClass or throw
// exception.
if (member.type.kind().value() == TCKind._tk_value_box ||
member.type.kind().value() == TCKind._tk_value ||
member.type.kind().value() == TCKind._tk_objref) {
Class c = RepositoryId.cache.getId(member.id).getClassFromType();
return ObjectStreamClass.getSignature(c);
} else {
return primitiveConstants[member.type.kind().value()];
}
}
示例5: name
import org.omg.CORBA.TCKind; //导入方法依赖的package包/类
public String name()
throws BadKind
{
switch (_kind) {
case tk_indirect:
return indirectType().name();
case TCKind._tk_except:
case TCKind._tk_objref:
case TCKind._tk_struct:
case TCKind._tk_union:
case TCKind._tk_enum:
case TCKind._tk_alias:
case TCKind._tk_value:
case TCKind._tk_value_box:
case TCKind._tk_native:
case TCKind._tk_abstract_interface:
return _name;
default:
throw new BadKind();
}
}
示例6: insert_val
import org.omg.CORBA.TCKind; //导入方法依赖的package包/类
public void insert_val(java.io.Serializable value)
throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch,
org.omg.DynamicAny.DynAnyPackage.InvalidValue
{
if (status == STATUS_DESTROYED) {
throw wrapper.dynAnyDestroyed() ;
}
int kind = any.type().kind().value();
if (kind != TCKind._tk_value && kind != TCKind._tk_value_box)
throw new TypeMismatch();
any.insert_Value(value);
}
示例7: createMostDerivedDynAny
import org.omg.CORBA.TCKind; //导入方法依赖的package包/类
static DynAny createMostDerivedDynAny(Any any, ORB orb, boolean copyValue)
throws org.omg.DynamicAny.DynAnyFactoryPackage.InconsistentTypeCode
{
if (any == null || ! DynAnyUtil.isConsistentType(any.type()))
throw new org.omg.DynamicAny.DynAnyFactoryPackage.InconsistentTypeCode();
switch (any.type().kind().value()) {
case TCKind._tk_sequence:
return new DynSequenceImpl(orb, any, copyValue);
case TCKind._tk_struct:
return new DynStructImpl(orb, any, copyValue);
case TCKind._tk_array:
return new DynArrayImpl(orb, any, copyValue);
case TCKind._tk_union:
return new DynUnionImpl(orb, any, copyValue);
case TCKind._tk_enum:
return new DynEnumImpl(orb, any, copyValue);
case TCKind._tk_fixed:
return new DynFixedImpl(orb, any, copyValue);
case TCKind._tk_value:
return new DynValueImpl(orb, any, copyValue);
case TCKind._tk_value_box:
return new DynValueBoxImpl(orb, any, copyValue);
default:
return new DynAnyBasicImpl(orb, any, copyValue);
}
}
示例8: get_val
import org.omg.CORBA.TCKind; //导入方法依赖的package包/类
public java.io.Serializable get_val()
throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch,
org.omg.DynamicAny.DynAnyPackage.InvalidValue
{
if (status == STATUS_DESTROYED) {
throw wrapper.dynAnyDestroyed() ;
}
int kind = any.type().kind().value();
if (kind != TCKind._tk_value && kind != TCKind._tk_value_box)
throw new TypeMismatch();
return any.extract_Value();
}
示例9: create_value_box_tc
import org.omg.CORBA.TCKind; //导入方法依赖的package包/类
public synchronized org.omg.CORBA.TypeCode create_value_box_tc(String id,
String name,
TypeCode boxed_type)
{
checkShutdownState();
return new TypeCodeImpl(this, TCKind._tk_value_box, id, name,
boxed_type);
}
示例10: isConstructedDynAny
import org.omg.CORBA.TCKind; //导入方法依赖的package包/类
static boolean isConstructedDynAny(DynAny dynAny) {
// DynFixed is constructed but not a subclass of DynAnyConstructedImpl
//return (dynAny instanceof DynAnyConstructedImpl);
int kind = dynAny.type().kind().value();
return (kind == TCKind._tk_sequence ||
kind == TCKind._tk_struct ||
kind == TCKind._tk_array ||
kind == TCKind._tk_union ||
kind == TCKind._tk_enum ||
kind == TCKind._tk_fixed ||
kind == TCKind._tk_value ||
kind == TCKind._tk_value_box);
}
示例11: 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);
}
示例12: 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;
}
}
示例13: create_value_box_tc
import org.omg.CORBA.TCKind; //导入方法依赖的package包/类
public org.omg.CORBA.TypeCode create_value_box_tc(String id,
String name,
TypeCode boxed_type)
{
return new TypeCodeImpl(this, TCKind._tk_value_box, id, name, boxed_type);
}
示例14: 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);
}