当前位置: 首页>>代码示例>>Java>>正文


Java TypeCodeImpl类代码示例

本文整理汇总了Java中com.sun.corba.se.impl.corba.TypeCodeImpl的典型用法代码示例。如果您正苦于以下问题:Java TypeCodeImpl类的具体用法?Java TypeCodeImpl怎么用?Java TypeCodeImpl使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


TypeCodeImpl类属于com.sun.corba.se.impl.corba包,在下文中一共展示了TypeCodeImpl类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: read_any

import com.sun.corba.se.impl.corba.TypeCodeImpl; //导入依赖的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;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:27,代码来源:CDRInputStream_1_0.java

示例2: get_primitive_tc

import com.sun.corba.se.impl.corba.TypeCodeImpl; //导入依赖的package包/类
public TypeCodeImpl get_primitive_tc(int kind)
{
    synchronized (this) {
        checkShutdownState();
    }
    try {
        return primitiveTypeCodeConstants[kind] ;
    } catch (Throwable t) {
        throw wrapper.invalidTypecodeKind( t, new Integer(kind) ) ;
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:12,代码来源:ORB.java

示例3: read_any

import com.sun.corba.se.impl.corba.TypeCodeImpl; //导入依赖的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 (org.omg.CORBA.MARSHAL ex) {
            if (tc.kind().value() != org.omg.CORBA.TCKind._tk_value) {
                throw ex;
            }
            // We can be sure that the whole typecode encapsulation has been
            // read off.
            ex.printStackTrace();
        }

        // read off the value of the any.
        any.read_value(parent, tc);

        return any;
    }
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:30,代码来源:IDLJavaSerializationInputStream.java

示例4: getTypeCodeAtPosition

import com.sun.corba.se.impl.corba.TypeCodeImpl; //导入依赖的package包/类
public TypeCodeImpl getTypeCodeAtPosition(int position) {
    if (typeMap == null)
        return null;
    //if (TypeCodeImpl.debug) {
        //System.out.println("Getting tc " + (TypeCode)typeMap.get(new Integer(position)) +
                           //" at position " + position);
    //}
    return (TypeCodeImpl)typeMap.get(new Integer(position));
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:10,代码来源:TypeCodeInputStream.java

示例5: printTypeMap

import com.sun.corba.se.impl.corba.TypeCodeImpl; //导入依赖的package包/类
public void printTypeMap() {
    System.out.println("typeMap = {");
    Iterator i = typeMap.keySet().iterator();
    while (i.hasNext()) {
        Integer pos = (Integer)i.next();
        TypeCodeImpl tci = (TypeCodeImpl)typeMap.get(pos);
        System.out.println("  key = " + pos.intValue() + ", value = " + tci.description());
    }
    System.out.println("}");
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:11,代码来源:TypeCodeInputStream.java

示例6: printTypeMap

import com.sun.corba.se.impl.corba.TypeCodeImpl; //导入依赖的package包/类
public void printTypeMap() {
    System.out.println("typeMap = {");
    List sortedKeys = new ArrayList(typeMap.keySet());
    Collections.sort(sortedKeys);
    Iterator i = sortedKeys.iterator();
    while (i.hasNext()) {
        Integer pos = (Integer)i.next();
        TypeCodeImpl tci = (TypeCodeImpl)typeMap.get(pos);
        System.out.println("  key = " + pos.intValue() + ", value = " + tci.description());
    }
    System.out.println("}");
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:13,代码来源:WrapperInputStream.java

示例7: create_union_tc

import com.sun.corba.se.impl.corba.TypeCodeImpl; //导入依赖的package包/类
/**
 * Create a TypeCode for a union.
 *
 * @param id                the logical id for the typecode.
 * @param name      the name for the typecode.
 * @param discriminator_type
 *                  the type of the union discriminator.
 * @param members   an array describing the members of the TypeCode.
 * @return          the requested TypeCode.
 */
public synchronized TypeCode create_union_tc(String id,
                                String name,
                                TypeCode discriminator_type,
                                UnionMember[] members)
{
    checkShutdownState();
    return new TypeCodeImpl(this,
                            TCKind._tk_union,
                            id,
                            name,
                            discriminator_type,
                            members);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:24,代码来源:ORBImpl.java

示例8: create_abstract_interface_tc

import com.sun.corba.se.impl.corba.TypeCodeImpl; //导入依赖的package包/类
public synchronized org.omg.CORBA.TypeCode create_abstract_interface_tc(
                                                           String id,
                                                           String name)
{
    checkShutdownState();
    return new TypeCodeImpl(this, TCKind._tk_abstract_interface, id, name);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:8,代码来源:ORBImpl.java

示例9: create_value_tc

import com.sun.corba.se.impl.corba.TypeCodeImpl; //导入依赖的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);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:11,代码来源:ORBImpl.java

示例10: create_value_box_tc

import com.sun.corba.se.impl.corba.TypeCodeImpl; //导入依赖的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);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:9,代码来源:ORBImpl.java

示例11: setTypeCodeForClass

import com.sun.corba.se.impl.corba.TypeCodeImpl; //导入依赖的package包/类
public synchronized void setTypeCodeForClass(Class c, TypeCodeImpl tci)
{
    checkShutdownState();

    if (typeCodeForClassMap == null)
        typeCodeForClassMap = Collections.synchronizedMap(
            new WeakHashMap(64));
    // Store only one TypeCode per class.
    if ( ! typeCodeForClassMap.containsKey(c))
        typeCodeForClassMap.put(c, tci);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:12,代码来源:ORBImpl.java

示例12: getTypeCodeForClass

import com.sun.corba.se.impl.corba.TypeCodeImpl; //导入依赖的package包/类
public synchronized TypeCodeImpl getTypeCodeForClass(Class c)
{
    checkShutdownState();

    if (typeCodeForClassMap == null)
        return null;
    return (TypeCodeImpl)typeCodeForClassMap.get(c);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:9,代码来源:ORBImpl.java

示例13: create_union_tc

import com.sun.corba.se.impl.corba.TypeCodeImpl; //导入依赖的package包/类
public TypeCode create_union_tc(String id,
                                String name,
                                TypeCode discriminator_type,
                                UnionMember[] members)
{
    return new TypeCodeImpl(this,
                            TCKind._tk_union,
                            id,
                            name,
                            discriminator_type,
                            members);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:13,代码来源:ORBSingleton.java

示例14: create_value_tc

import com.sun.corba.se.impl.corba.TypeCodeImpl; //导入依赖的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);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:10,代码来源:ORBSingleton.java

示例15: isRecursive

import com.sun.corba.se.impl.corba.TypeCodeImpl; //导入依赖的package包/类
protected boolean isRecursive() {
    if (isRecursive == RECURSIVE_UNDEF) {
        TypeCode typeCode = any.type();
        if (typeCode instanceof TypeCodeImpl) {
            if (((TypeCodeImpl)typeCode).is_recursive())
                isRecursive = RECURSIVE_YES;
            else
                isRecursive = RECURSIVE_NO;
        } else {
            // No way to find out unless the TypeCode spec changes.
            isRecursive = RECURSIVE_NO;
        }
    }
    return (isRecursive == RECURSIVE_YES);
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:16,代码来源:DynAnyConstructedImpl.java


注:本文中的com.sun.corba.se.impl.corba.TypeCodeImpl类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。