Java Code Examples for org.omg.CORBA.TCKind._tk_alias

The following are Jave code examples for showing how to use _tk_alias of the org.omg.CORBA.TCKind class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
+ Save this method
Example 1
Project: OpenJSharp   File: TypeCodeImpl.java   View Source Code Vote up 6 votes
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

}
 
Example 2
Project: OpenJSharp   File: TypeCodeImpl.java   View Source Code Vote up 6 votes
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();
    }
}
 
Example 3
Project: OpenJSharp   File: TypeCodeImpl.java   View Source Code Vote up 6 votes
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();
    }
}
 
Example 4
Project: OpenJSharp   File: TypeCodeImpl.java   View Source Code Vote up 6 votes
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();
    }
}
 
Example 5
Project: openjdk-jdk10   File: TypeCodeImpl.java   View Source Code Vote up 6 votes
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

}
 
Example 6
Project: openjdk-jdk10   File: TypeCodeImpl.java   View Source Code Vote up 6 votes
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();
    }
}
 
Example 7
Project: openjdk-jdk10   File: TypeCodeImpl.java   View Source Code Vote up 6 votes
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();
    }
}
 
Example 8
Project: openjdk-jdk10   File: TypeCodeImpl.java   View Source Code Vote up 6 votes
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();
    }
}
 
Example 9
Project: OpenJSharp   File: ORBSingleton.java   View Source Code Vote up 4 votes
public TypeCode create_alias_tc(String id,
                                String name,
                                TypeCode original_type)
{
    return new TypeCodeImpl(this, TCKind._tk_alias, id, name, original_type);
}
 
Example 10
Project: openjdk-jdk10   File: ORBSingleton.java   View Source Code Vote up 4 votes
public TypeCode create_alias_tc(String id,
                                String name,
                                TypeCode original_type)
{
    return new TypeCodeImpl(this, TCKind._tk_alias, id, name, original_type);
}
 
Example 11
Project: OpenJSharp   File: ORBImpl.java   View Source Code Vote up 3 votes
/**
 * Create a TypeCode for an alias.
 *
 * @param id                the logical id for the typecode.
 * @param name      the name for the typecode.
 * @param original_type
 *                  the type this is an alias for.
 * @return          the requested TypeCode.
 */
public synchronized TypeCode create_alias_tc(String id,
                                String name,
                                TypeCode original_type)
{
    checkShutdownState();
    return new TypeCodeImpl(this, TCKind._tk_alias, id, name, original_type);
}
 
Example 12
Project: openjdk-jdk10   File: ORBImpl.java   View Source Code Vote up 3 votes
/**
 * Create a TypeCode for an alias.
 *
 * @param id                the logical id for the typecode.
 * @param name      the name for the typecode.
 * @param original_type
 *                  the type this is an alias for.
 * @return          the requested TypeCode.
 */
public synchronized TypeCode create_alias_tc(String id,
                                String name,
                                TypeCode original_type)
{
    checkShutdownState();
    return new TypeCodeImpl(this, TCKind._tk_alias, id, name, original_type);
}