本文整理汇总了Java中org.omg.CORBA.TCKind._tk_value方法的典型用法代码示例。如果您正苦于以下问题:Java TCKind._tk_value方法的具体用法?Java TCKind._tk_value怎么用?Java TCKind._tk_value使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.omg.CORBA.TCKind
的用法示例。
在下文中一共展示了TCKind._tk_value方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: member_type
import org.omg.CORBA.TCKind; //导入方法依赖的package包/类
public TypeCode member_type(int index)
throws BadKind, org.omg.CORBA.TypeCodePackage.Bounds
{
switch (_kind) {
case tk_indirect:
return indirectType().member_type(index);
case TCKind._tk_except:
case TCKind._tk_struct:
case TCKind._tk_union:
case TCKind._tk_value:
try {
return _memberTypes[index];
} catch (ArrayIndexOutOfBoundsException e) {
throw new org.omg.CORBA.TypeCodePackage.Bounds();
}
default:
throw new BadKind();
}
}
示例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: 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()];
}
}
示例4: member_count
import org.omg.CORBA.TCKind; //导入方法依赖的package包/类
public int member_count()
throws BadKind
{
switch (_kind) {
case tk_indirect:
return indirectType().member_count();
case TCKind._tk_except:
case TCKind._tk_struct:
case TCKind._tk_union:
case TCKind._tk_enum:
case TCKind._tk_value:
return _memberCount;
default:
throw new BadKind();
}
}
示例5: read_any
import org.omg.CORBA.TCKind; //导入方法依赖的package包/类
public Any read_any() {
Any any = orb.create_any();
TypeCodeImpl tc = new TypeCodeImpl(orb);
// read off the typecode
// REVISIT We could avoid this try-catch if we could peek the typecode
// kind off this stream and see if it is a tk_value. Looking at the
// code we know that for tk_value the Any.read_value() below
// ignores the tc argument anyway (except for the kind field).
// But still we would need to make sure that the whole typecode,
// including encapsulations, is read off.
try {
tc.read_value(parent);
} catch (MARSHAL ex) {
if (tc.kind().value() != TCKind._tk_value)
throw ex;
// We can be sure that the whole typecode encapsulation has been
// read off.
dprintThrowable(ex);
}
// read off the value of the any
any.read_value(parent, tc);
return any;
}
示例6: 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();
}
}
示例7: 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();
}
示例8: 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);
}
}
示例9: concrete_base_type
import org.omg.CORBA.TCKind; //导入方法依赖的package包/类
public TypeCode concrete_base_type() throws BadKind {
switch (_kind) {
case tk_indirect:
return indirectType().concrete_base_type();
case TCKind._tk_value:
return _concrete_base;
default:
throw new BadKind();
}
}
示例10: member_visibility
import org.omg.CORBA.TCKind; //导入方法依赖的package包/类
public short member_visibility(int index) throws BadKind,
org.omg.CORBA.TypeCodePackage.Bounds {
switch (_kind) {
case tk_indirect:
return indirectType().member_visibility(index);
case TCKind._tk_value:
try {
return _memberAccess[index];
} catch (ArrayIndexOutOfBoundsException e) {
throw new org.omg.CORBA.TypeCodePackage.Bounds();
}
default:
throw new BadKind();
}
}
示例11: create_value_tc
import org.omg.CORBA.TCKind; //导入方法依赖的package包/类
public synchronized org.omg.CORBA.TypeCode create_value_tc(String id,
String name,
short type_modifier,
TypeCode concrete_base,
ValueMember[] members)
{
checkShutdownState();
return new TypeCodeImpl(this, TCKind._tk_value, id, name,
type_modifier, concrete_base, members);
}
示例12: createMostDerivedDynAny
import org.omg.CORBA.TCKind; //导入方法依赖的package包/类
static DynAny createMostDerivedDynAny(TypeCode typeCode, ORB orb)
throws org.omg.DynamicAny.DynAnyFactoryPackage.InconsistentTypeCode
{
if (typeCode == null || ! DynAnyUtil.isConsistentType(typeCode))
throw new org.omg.DynamicAny.DynAnyFactoryPackage.InconsistentTypeCode();
switch (typeCode.kind().value()) {
case TCKind._tk_sequence:
return new DynSequenceImpl(orb, typeCode);
case TCKind._tk_struct:
return new DynStructImpl(orb, typeCode);
case TCKind._tk_array:
return new DynArrayImpl(orb, typeCode);
case TCKind._tk_union:
return new DynUnionImpl(orb, typeCode);
case TCKind._tk_enum:
return new DynEnumImpl(orb, typeCode);
case TCKind._tk_fixed:
return new DynFixedImpl(orb, typeCode);
case TCKind._tk_value:
return new DynValueImpl(orb, typeCode);
case TCKind._tk_value_box:
return new DynValueBoxImpl(orb, typeCode);
default:
return new DynAnyBasicImpl(orb, typeCode);
}
}
示例13: 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);
}
示例14: 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);
}
示例15: create_value_tc
import org.omg.CORBA.TCKind; //导入方法依赖的package包/类
public org.omg.CORBA.TypeCode create_value_tc(String id,
String name,
short type_modifier,
TypeCode concrete_base,
ValueMember[] members)
{
return new TypeCodeImpl(this, TCKind._tk_value, id, name,
type_modifier, concrete_base, members);
}