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

The following are Jave code examples for showing how to use _tk_array 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 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 2
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 3
Project: OpenJSharp   File: TypeCodeImpl.java   View Source Code Vote up 5 votes
public TypeCodeImpl(ORB orb,
                    int creationKind,
                    int bound,
                    TypeCode element_type)
                    // for sequences and arrays
{
    this(orb) ;

    if ( creationKind == TCKind._tk_sequence || creationKind == TCKind._tk_array ) {
        _kind               = creationKind;
        _length             = bound;
        _contentType        = convertToNative(_orb, element_type);
    } // else initializes to null
}
 
Example 4
Project: OpenJSharp   File: TypeCodeImpl.java   View Source Code Vote up 5 votes
public int length()
    throws BadKind
{
    switch (_kind) {
    case tk_indirect:
        return indirectType().length();
    case TCKind._tk_string:
    case TCKind._tk_wstring:
    case TCKind._tk_sequence:
    case TCKind._tk_array:
        return _length;
    default:
        throw new BadKind();
    }
}
 
Example 5
Project: OpenJSharp   File: DynAnyUtil.java   View Source Code Vote up 5 votes
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);
}
 
Example 6
Project: OpenJSharp   File: DynAnyUtil.java   View Source Code Vote up 5 votes
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);
    }
}
 
Example 7
Project: OpenJSharp   File: DynAnyUtil.java   View Source Code Vote up 5 votes
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);
    }
}
 
Example 8
Project: openjdk-jdk10   File: TypeCodeImpl.java   View Source Code Vote up 5 votes
public TypeCodeImpl(ORB orb,
                    int creationKind,
                    int bound,
                    TypeCode element_type)
                    // for sequences and arrays
{
    this(orb) ;

    if ( creationKind == TCKind._tk_sequence || creationKind == TCKind._tk_array ) {
        _kind               = creationKind;
        _length             = bound;
        _contentType        = convertToNative(_orb, element_type);
    } // else initializes to null
}
 
Example 9
Project: openjdk-jdk10   File: TypeCodeImpl.java   View Source Code Vote up 5 votes
public int length()
    throws BadKind
{
    switch (_kind) {
    case tk_indirect:
        return indirectType().length();
    case TCKind._tk_string:
    case TCKind._tk_wstring:
    case TCKind._tk_sequence:
    case TCKind._tk_array:
        return _length;
    default:
        throw new BadKind();
    }
}
 
Example 10
Project: openjdk-jdk10   File: DynAnyUtil.java   View Source Code Vote up 5 votes
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);
}
 
Example 11
Project: openjdk-jdk10   File: DynAnyUtil.java   View Source Code Vote up 5 votes
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);
    }
}
 
Example 12
Project: openjdk-jdk10   File: DynAnyUtil.java   View Source Code Vote up 5 votes
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);
    }
}
 
Example 13
Project: OpenJSharp   File: ORBSingleton.java   View Source Code Vote up 4 votes
public TypeCode create_array_tc(int length,
                                TypeCode element_type)
{
    return new TypeCodeImpl(this, TCKind._tk_array, length, element_type);
}
 
Example 14
Project: openjdk-jdk10   File: ORBSingleton.java   View Source Code Vote up 4 votes
public TypeCode create_array_tc(int length,
                                TypeCode element_type)
{
    return new TypeCodeImpl(this, TCKind._tk_array, length, element_type);
}
 
Example 15
Project: OpenJSharp   File: ORBImpl.java   View Source Code Vote up 3 votes
/**
 * Create a TypeCode for an array.
 *
 * @param length    the length of the array.
 * @param element_type
 *                  the type of elements of the array.
 * @return          the requested TypeCode.
 */
public synchronized TypeCode create_array_tc(int length,
                                TypeCode element_type)
{
    checkShutdownState();
    return new TypeCodeImpl(this, TCKind._tk_array, length, element_type);
}
 
Example 16
Project: openjdk-jdk10   File: ORBImpl.java   View Source Code Vote up 3 votes
/**
 * Create a TypeCode for an array.
 *
 * @param length    the length of the array.
 * @param element_type
 *                  the type of elements of the array.
 * @return          the requested TypeCode.
 */
public synchronized TypeCode create_array_tc(int length,
                                TypeCode element_type)
{
    checkShutdownState();
    return new TypeCodeImpl(this, TCKind._tk_array, length, element_type);
}