org.omg.CORBA.StructMember Java Examples

The following examples show how to use org.omg.CORBA.StructMember. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: TypeCodeImpl.java    From jdk1.8-source-analysis with Apache License 2.0 6 votes vote down vote up
public TypeCodeImpl(ORB orb,
                    int creationKind,
                    String id,
                    String name,
                    StructMember[] members)
                    // for structs and exceptions
{
    this(orb);

    if ((creationKind == TCKind._tk_struct) || (creationKind == TCKind._tk_except)) {
        _kind               = creationKind;
        setId(id);
        _name               = name;
        _memberCount        = members.length;

        _memberNames = new String[_memberCount];
        _memberTypes = new TypeCodeImpl[_memberCount];

        for (int i = 0 ; i < _memberCount ; i++) {
            _memberNames[i] = members[i].name;
            _memberTypes[i] = convertToNative(_orb, members[i].type);
            _memberTypes[i].setParent(this);
        }
    } // else initializes to null
}
 
Example #2
Source File: TypeCodeImpl.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
public TypeCodeImpl(ORB orb,
                    int creationKind,
                    String id,
                    String name,
                    StructMember[] members)
                    // for structs and exceptions
{
    this(orb);

    if ((creationKind == TCKind._tk_struct) || (creationKind == TCKind._tk_except)) {
        _kind               = creationKind;
        setId(id);
        _name               = name;
        _memberCount        = members.length;

        _memberNames = new String[_memberCount];
        _memberTypes = new TypeCodeImpl[_memberCount];

        for (int i = 0 ; i < _memberCount ; i++) {
            _memberNames[i] = members[i].name;
            _memberTypes[i] = convertToNative(_orb, members[i].type);
            _memberTypes[i].setParent(this);
        }
    } // else initializes to null
}
 
Example #3
Source File: TypeCodeImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
public TypeCodeImpl(ORB orb,
                    int creationKind,
                    String id,
                    String name,
                    StructMember[] members)
                    // for structs and exceptions
{
    this(orb);

    if ((creationKind == TCKind._tk_struct) || (creationKind == TCKind._tk_except)) {
        _kind               = creationKind;
        setId(id);
        _name               = name;
        _memberCount        = members.length;

        _memberNames = new String[_memberCount];
        _memberTypes = new TypeCodeImpl[_memberCount];

        for (int i = 0 ; i < _memberCount ; i++) {
            _memberNames[i] = members[i].name;
            _memberTypes[i] = convertToNative(_orb, members[i].type);
            _memberTypes[i].setParent(this);
        }
    } // else initializes to null
}
 
Example #4
Source File: TypeCodeImpl.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
public TypeCodeImpl(ORB orb,
                    int creationKind,
                    String id,
                    String name,
                    StructMember[] members)
                    // for structs and exceptions
{
    this(orb);

    if ((creationKind == TCKind._tk_struct) || (creationKind == TCKind._tk_except)) {
        _kind               = creationKind;
        setId(id);
        _name               = name;
        _memberCount        = members.length;

        _memberNames = new String[_memberCount];
        _memberTypes = new TypeCodeImpl[_memberCount];

        for (int i = 0 ; i < _memberCount ; i++) {
            _memberNames[i] = members[i].name;
            _memberTypes[i] = convertToNative(_orb, members[i].type);
            _memberTypes[i].setParent(this);
        }
    } // else initializes to null
}
 
Example #5
Source File: TypeCodeImpl.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
public TypeCodeImpl(ORB orb,
                    int creationKind,
                    String id,
                    String name,
                    StructMember[] members)
                    // for structs and exceptions
{
    this(orb);

    if ((creationKind == TCKind._tk_struct) || (creationKind == TCKind._tk_except)) {
        _kind               = creationKind;
        setId(id);
        _name               = name;
        _memberCount        = members.length;

        _memberNames = new String[_memberCount];
        _memberTypes = new TypeCodeImpl[_memberCount];

        for (int i = 0 ; i < _memberCount ; i++) {
            _memberNames[i] = members[i].name;
            _memberTypes[i] = convertToNative(_orb, members[i].type);
            _memberTypes[i].setParent(this);
        }
    } // else initializes to null
}
 
Example #6
Source File: TypeCodeImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
public TypeCodeImpl(ORB orb,
                    int creationKind,
                    String id,
                    String name,
                    StructMember[] members)
                    // for structs and exceptions
{
    this(orb);

    if ((creationKind == TCKind._tk_struct) || (creationKind == TCKind._tk_except)) {
        _kind               = creationKind;
        setId(id);
        _name               = name;
        _memberCount        = members.length;

        _memberNames = new String[_memberCount];
        _memberTypes = new TypeCodeImpl[_memberCount];

        for (int i = 0 ; i < _memberCount ; i++) {
            _memberNames[i] = members[i].name;
            _memberTypes[i] = convertToNative(_orb, members[i].type);
            _memberTypes[i].setParent(this);
        }
    } // else initializes to null
}
 
Example #7
Source File: TypeCodeImpl.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
public TypeCodeImpl(ORB orb,
                    int creationKind,
                    String id,
                    String name,
                    StructMember[] members)
                    // for structs and exceptions
{
    this(orb);

    if ((creationKind == TCKind._tk_struct) || (creationKind == TCKind._tk_except)) {
        _kind               = creationKind;
        setId(id);
        _name               = name;
        _memberCount        = members.length;

        _memberNames = new String[_memberCount];
        _memberTypes = new TypeCodeImpl[_memberCount];

        for (int i = 0 ; i < _memberCount ; i++) {
            _memberNames[i] = members[i].name;
            _memberTypes[i] = convertToNative(_orb, members[i].type);
            _memberTypes[i].setParent(this);
        }
    } // else initializes to null
}
 
Example #8
Source File: TypeCodeImpl.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
public TypeCodeImpl(ORB orb,
                    int creationKind,
                    String id,
                    String name,
                    StructMember[] members)
                    // for structs and exceptions
{
    this(orb);

    if ((creationKind == TCKind._tk_struct) || (creationKind == TCKind._tk_except)) {
        _kind               = creationKind;
        setId(id);
        _name               = name;
        _memberCount        = members.length;

        _memberNames = new String[_memberCount];
        _memberTypes = new TypeCodeImpl[_memberCount];

        for (int i = 0 ; i < _memberCount ; i++) {
            _memberNames[i] = members[i].name;
            _memberTypes[i] = convertToNative(_orb, members[i].type);
            _memberTypes[i].setParent(this);
        }
    } // else initializes to null
}
 
Example #9
Source File: TypeCodeImpl.java    From JDKSourceCode1.8 with MIT License 6 votes vote down vote up
public TypeCodeImpl(ORB orb,
                    int creationKind,
                    String id,
                    String name,
                    StructMember[] members)
                    // for structs and exceptions
{
    this(orb);

    if ((creationKind == TCKind._tk_struct) || (creationKind == TCKind._tk_except)) {
        _kind               = creationKind;
        setId(id);
        _name               = name;
        _memberCount        = members.length;

        _memberNames = new String[_memberCount];
        _memberTypes = new TypeCodeImpl[_memberCount];

        for (int i = 0 ; i < _memberCount ; i++) {
            _memberNames[i] = members[i].name;
            _memberTypes[i] = convertToNative(_orb, members[i].type);
            _memberTypes[i].setParent(this);
        }
    } // else initializes to null
}
 
Example #10
Source File: TypeCodeImpl.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
public TypeCodeImpl(ORB orb,
                    int creationKind,
                    String id,
                    String name,
                    StructMember[] members)
                    // for structs and exceptions
{
    this(orb);

    if ((creationKind == TCKind._tk_struct) || (creationKind == TCKind._tk_except)) {
        _kind               = creationKind;
        setId(id);
        _name               = name;
        _memberCount        = members.length;

        _memberNames = new String[_memberCount];
        _memberTypes = new TypeCodeImpl[_memberCount];

        for (int i = 0 ; i < _memberCount ; i++) {
            _memberNames[i] = members[i].name;
            _memberTypes[i] = convertToNative(_orb, members[i].type);
            _memberTypes[i].setParent(this);
        }
    } // else initializes to null
}
 
Example #11
Source File: ORBUtility.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
private static StructMember[] systemExceptionMembers (ORB orb) {
    if (members == null) {
        members = new StructMember[3];
        members[0] = new StructMember("id", orb.create_string_tc(0), null);
        members[1] = new StructMember("minor", orb.get_primitive_tc(TCKind.tk_long), null);
        members[2] = new StructMember("completed", orb.get_primitive_tc(TCKind.tk_long), null);
    }
    return members;
}
 
Example #12
Source File: ORBUtility.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
private static StructMember[] systemExceptionMembers (ORB orb) {
    if (members == null) {
        members = new StructMember[3];
        members[0] = new StructMember("id", orb.create_string_tc(0), null);
        members[1] = new StructMember("minor", orb.get_primitive_tc(TCKind.tk_long), null);
        members[2] = new StructMember("completed", orb.get_primitive_tc(TCKind.tk_long), null);
    }
    return members;
}
 
Example #13
Source File: ORBUtility.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
private static StructMember[] systemExceptionMembers (ORB orb) {
    if (members == null) {
        members = new StructMember[3];
        members[0] = new StructMember("id", orb.create_string_tc(0), null);
        members[1] = new StructMember("minor", orb.get_primitive_tc(TCKind.tk_long), null);
        members[2] = new StructMember("completed", orb.get_primitive_tc(TCKind.tk_long), null);
    }
    return members;
}
 
Example #14
Source File: SystemExceptionHelper.java    From cxf with Apache License 2.0 5 votes vote down vote up
public TypeCode _type() {
    if (typeCode == null) {
        ORB orb = ORB.init();
        StructMember[] smBuf = new StructMember[2];
        TypeCode minortc = orb.get_primitive_tc(TCKind.tk_long);
        smBuf[0] = new StructMember("minor", minortc, null);

        String[] csLabels = {"COMPLETED_YES", "COMPLETED_NO", "COMPLETED_MAYBE"};
        TypeCode completedtc = orb
            .create_enum_tc("IDL:omg.org/CORBA/CompletionStatus:1.0",
                          "CompletionStatus", csLabels);

        smBuf[1] = new StructMember("completed", completedtc, null);
        String id;
        String name;
        if (value == null) {
            name = "SystemException";
            id = "IDL:omg.org/CORBA/SystemException:1.0";
        } else {
            String className = value.getClass().getName();
            name = className.substring(className.lastIndexOf('.') + 1);
            id = "IDL:omg.org/CORBA/" + name + ":1.0";
        }

        typeCode = orb.create_exception_tc(id, name, smBuf);
    }
    return typeCode;
}
 
Example #15
Source File: ORBUtility.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
private static StructMember[] systemExceptionMembers (ORB orb) {
    if (members == null) {
        members = new StructMember[3];
        members[0] = new StructMember("id", orb.create_string_tc(0), null);
        members[1] = new StructMember("minor", orb.get_primitive_tc(TCKind.tk_long), null);
        members[2] = new StructMember("completed", orb.get_primitive_tc(TCKind.tk_long), null);
    }
    return members;
}
 
Example #16
Source File: ORBUtility.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
private static StructMember[] systemExceptionMembers (ORB orb) {
    if (members == null) {
        members = new StructMember[3];
        members[0] = new StructMember("id", orb.create_string_tc(0), null);
        members[1] = new StructMember("minor", orb.get_primitive_tc(TCKind.tk_long), null);
        members[2] = new StructMember("completed", orb.get_primitive_tc(TCKind.tk_long), null);
    }
    return members;
}
 
Example #17
Source File: ORBUtility.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
private static StructMember[] systemExceptionMembers (ORB orb) {
    if (members == null) {
        members = new StructMember[3];
        members[0] = new StructMember("id", orb.create_string_tc(0), null);
        members[1] = new StructMember("minor", orb.get_primitive_tc(TCKind.tk_long), null);
        members[2] = new StructMember("completed", orb.get_primitive_tc(TCKind.tk_long), null);
    }
    return members;
}
 
Example #18
Source File: ORBUtility.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
private static StructMember[] systemExceptionMembers (ORB orb) {
    if (members == null) {
        members = new StructMember[3];
        members[0] = new StructMember("id", orb.create_string_tc(0), null);
        members[1] = new StructMember("minor", orb.get_primitive_tc(TCKind.tk_long), null);
        members[2] = new StructMember("completed", orb.get_primitive_tc(TCKind.tk_long), null);
    }
    return members;
}
 
Example #19
Source File: ORBUtility.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
private static StructMember[] systemExceptionMembers (ORB orb) {
    if (members == null) {
        members = new StructMember[3];
        members[0] = new StructMember("id", orb.create_string_tc(0), null);
        members[1] = new StructMember("minor", orb.get_primitive_tc(TCKind.tk_long), null);
        members[2] = new StructMember("completed", orb.get_primitive_tc(TCKind.tk_long), null);
    }
    return members;
}
 
Example #20
Source File: ORBUtility.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
private static StructMember[] systemExceptionMembers (ORB orb) {
    if (members == null) {
        members = new StructMember[3];
        members[0] = new StructMember("id", orb.create_string_tc(0), null);
        members[1] = new StructMember("minor", orb.get_primitive_tc(TCKind.tk_long), null);
        members[2] = new StructMember("completed", orb.get_primitive_tc(TCKind.tk_long), null);
    }
    return members;
}
 
Example #21
Source File: ORBUtility.java    From JDKSourceCode1.8 with MIT License 5 votes vote down vote up
private static StructMember[] systemExceptionMembers (ORB orb) {
    if (members == null) {
        members = new StructMember[3];
        members[0] = new StructMember("id", orb.create_string_tc(0), null);
        members[1] = new StructMember("minor", orb.get_primitive_tc(TCKind.tk_long), null);
        members[2] = new StructMember("completed", orb.get_primitive_tc(TCKind.tk_long), null);
    }
    return members;
}
 
Example #22
Source File: CorbaObjectWriterTest.java    From cxf with Apache License 2.0 4 votes vote down vote up
@Test
public void testWriteStruct() {
    // create the following struct
    // struct TestStruct {
    //     long member1;
    //     string member2;
    //     boolean member3;
    // }
    int member1 = 12345;
    String member2 = "54321";
    boolean member3 = true;

    QName structIdlType = new QName(CorbaConstants.NU_WSDL_CORBA, "struct", CorbaConstants.NP_WSDL_CORBA);
    QName longIdlType = new QName(CorbaConstants.NU_WSDL_CORBA, "long", CorbaConstants.NP_WSDL_CORBA);
    QName stringIdlType = new QName(CorbaConstants.NU_WSDL_CORBA, "string", CorbaConstants.NP_WSDL_CORBA);
    QName boolIdlType = new QName(CorbaConstants.NU_WSDL_CORBA, "boolean", CorbaConstants.NP_WSDL_CORBA);

    Struct structType = new Struct();
    structType.setName("TestStruct");
    MemberType m1 = new MemberType();
    m1.setIdltype(longIdlType);
    m1.setName("member1");
    MemberType m2 = new MemberType();
    m2.setIdltype(stringIdlType);
    m2.setName("member2");
    MemberType m3 = new MemberType();
    m3.setIdltype(boolIdlType);
    m3.setName("member3");
    structType.getMember().add(m1);
    structType.getMember().add(m2);
    structType.getMember().add(m3);

    // build the object holder
    StructMember[] structMembers = new StructMember[3];
    structMembers[0] = new StructMember("member1", orb.get_primitive_tc(TCKind.tk_long), null);
    structMembers[1] = new StructMember("member2", orb.get_primitive_tc(TCKind.tk_string), null);
    structMembers[2] = new StructMember("member3", orb.get_primitive_tc(TCKind.tk_boolean), null);
    TypeCode structTC = orb.create_struct_tc("IDL:org.apache.cxf.TestStruct/1.0", "TestStruct",
                                             structMembers);
    CorbaStructHandler obj = new CorbaStructHandler(new QName("TestStruct"), structIdlType,
                                                    structTC, structType);
    CorbaPrimitiveHandler memberObj1 =
        new CorbaPrimitiveHandler(new QName("member1"), longIdlType, structMembers[0].type, null);
    CorbaPrimitiveHandler memberObj2 =
        new CorbaPrimitiveHandler(new QName("member2"), stringIdlType, structMembers[1].type, null);
    CorbaPrimitiveHandler memberObj3 =
        new CorbaPrimitiveHandler(new QName("member3"), boolIdlType, structMembers[2].type, null);

    memberObj1.setValueFromData(Integer.toString(member1));
    memberObj2.setValueFromData(member2);
    memberObj3.setValueFromData(Boolean.toString(member3));

    obj.addMember(memberObj1);
    obj.addMember(memberObj2);
    obj.addMember(memberObj3);

    OutputStream oStream = orb.create_output_stream();
    CorbaObjectWriter writer = new CorbaObjectWriter(oStream);
    writer.writeStruct(obj);

    InputStream iStream = oStream.create_input_stream();
    int readMember1 = iStream.read_long();
    assertTrue(readMember1 == member1);
    String readMember2 = iStream.read_string();
    assertEquals(readMember2, member2);
    boolean readMember3 = iStream.read_boolean();
    assertTrue(readMember3 == member3);
}
 
Example #23
Source File: TestOrbImpl.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
@Override
public TypeCode create_struct_tc(String id, String name,
        StructMember[] members) {
    return null;
}
 
Example #24
Source File: CorbaObjectWriterTest.java    From cxf with Apache License 2.0 4 votes vote down vote up
@Test
public void testWriteException() {
    // create the following exception
    // exception TestExcept {
    //     short code;
    //     string message;
    // }
    short code = 12345;
    String message = "54321";
    String reposID = "IDL:org.apache.cxf.TestException/1.0";

    QName exceptIdlType = new QName(CorbaConstants.NU_WSDL_CORBA,
                                    "exception", CorbaConstants.NP_WSDL_CORBA);
    QName shortIdlType = new QName(CorbaConstants.NU_WSDL_CORBA,
                                   "short", CorbaConstants.NP_WSDL_CORBA);
    QName stringIdlType = new QName(CorbaConstants.NU_WSDL_CORBA,
                                    "string", CorbaConstants.NP_WSDL_CORBA);

    Exception exceptType = new Exception();
    exceptType.setName("TestException");
    exceptType.setRepositoryID(reposID);
    MemberType m1 = new MemberType();
    m1.setIdltype(shortIdlType);
    m1.setName("code");
    MemberType m2 = new MemberType();
    m2.setIdltype(stringIdlType);
    m2.setName("message");
    exceptType.getMember().add(m1);
    exceptType.getMember().add(m2);

    // build the object holder
    StructMember[] exceptMembers = new StructMember[2];
    exceptMembers[0] = new StructMember("code", orb.get_primitive_tc(TCKind.tk_short), null);
    exceptMembers[1] = new StructMember("message", orb.get_primitive_tc(TCKind.tk_string), null);
    TypeCode exceptTC = orb.create_exception_tc(reposID, "TestException", exceptMembers);
    CorbaExceptionHandler obj = new CorbaExceptionHandler(new QName("TestException"), exceptIdlType,
                                                          exceptTC, exceptType);

    CorbaPrimitiveHandler member1 =
        new CorbaPrimitiveHandler(new QName("code"), shortIdlType, exceptMembers[0].type, null);
    member1.setValueFromData(Short.toString(code));
    CorbaPrimitiveHandler member2 =
        new CorbaPrimitiveHandler(new QName("message"), stringIdlType, exceptMembers[1].type, null);
    member2.setValueFromData(message);
    obj.addMember(member1);
    obj.addMember(member2);

    OutputStream oStream = orb.create_output_stream();
    CorbaObjectWriter writer = new CorbaObjectWriter(oStream);
    writer.writeException(obj);

    InputStream iStream = oStream.create_input_stream();

    String readId = iStream.read_string();
    assertEquals(readId, reposID);
    short readCode = iStream.read_short();
    assertTrue(readCode == code);
    String readMessage = iStream.read_string();
    assertEquals(readMessage, message);
}
 
Example #25
Source File: TestSingletonOrbImpl.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
@Override
public TypeCode create_exception_tc(String id, String name,
        StructMember[] members) {
    return null;
}
 
Example #26
Source File: TestSingletonOrbImpl.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
@Override
public TypeCode create_struct_tc(String id, String name,
        StructMember[] members) {
    return null;
}
 
Example #27
Source File: CorbaObjectReaderTest.java    From cxf with Apache License 2.0 4 votes vote down vote up
@Test
public void testReadStruct() {
    OutputStream oStream = orb.create_output_stream();

    // create the following struct
    // struct TestStruct {
    //     long member1;
    //     string member2;
    //     boolean member3;
    // }
    int member1 = 12345;
    String member2 = "54321";
    boolean member3 = true;

    oStream.write_long(member1);
    oStream.write_string(member2);
    oStream.write_boolean(member3);

    InputStream iStream = oStream.create_input_stream();
    CorbaObjectReader reader = new CorbaObjectReader(iStream);

    QName structIdlType = new QName(CorbaConstants.NU_WSDL_CORBA, "struct", CorbaConstants.NP_WSDL_CORBA);
    QName longIdlType = new QName(CorbaConstants.NU_WSDL_CORBA, "long", CorbaConstants.NP_WSDL_CORBA);
    QName stringIdlType = new QName(CorbaConstants.NU_WSDL_CORBA, "string", CorbaConstants.NP_WSDL_CORBA);
    QName boolIdlType = new QName(CorbaConstants.NU_WSDL_CORBA, "boolean", CorbaConstants.NP_WSDL_CORBA);

    Struct structType = new Struct();
    structType.setName("TestStruct");
    MemberType m1 = new MemberType();
    m1.setIdltype(longIdlType);
    m1.setName("member1");
    MemberType m2 = new MemberType();
    m2.setIdltype(stringIdlType);
    m2.setName("member2");
    MemberType m3 = new MemberType();
    m3.setIdltype(boolIdlType);
    m3.setName("member3");
    structType.getMember().add(m1);
    structType.getMember().add(m2);
    structType.getMember().add(m3);

    // build the object holder
    StructMember[] structMembers = new StructMember[3];
    structMembers[0] = new StructMember("member1", orb.get_primitive_tc(TCKind.tk_long), null);
    structMembers[1] = new StructMember("member2", orb.get_primitive_tc(TCKind.tk_string), null);
    structMembers[2] = new StructMember("member3", orb.get_primitive_tc(TCKind.tk_boolean), null);
    TypeCode structTC = orb.create_struct_tc("IDL:org.apache.cxf.TestStruct/1.0", "TestStruct",
                                             structMembers);
    CorbaStructHandler obj = new CorbaStructHandler(new QName("TestStruct"), structIdlType,
                                                  structTC, structType);
    obj.addMember(
            new CorbaPrimitiveHandler(new QName("member1"), longIdlType, structMembers[0].type, null));
    obj.addMember(
            new CorbaPrimitiveHandler(new QName("member2"), stringIdlType, structMembers[1].type, null));
    obj.addMember(
            new CorbaPrimitiveHandler(new QName("member3"), boolIdlType, structMembers[2].type, null));

    reader.readStruct(obj);

    List<CorbaObjectHandler> nestedObjs = obj.getMembers();
    assertTrue(Integer.parseInt(((CorbaPrimitiveHandler)nestedObjs.get(0)).getDataFromValue())
               == member1);
    assertEquals(((CorbaPrimitiveHandler)nestedObjs.get(1)).getDataFromValue(), member2);
    assertTrue(Boolean.parseBoolean(((CorbaPrimitiveHandler)nestedObjs.get(2))
                               .getDataFromValue())
               == member3);
}
 
Example #28
Source File: ORBSingleton.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
public TypeCode create_struct_tc(String id,
                                 String name,
                                 StructMember[] members)
{
    return new TypeCodeImpl(this, TCKind._tk_struct, id, name, members);
}
 
Example #29
Source File: ORBSingleton.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
public TypeCode create_exception_tc(String id,
                                    String name,
                                    StructMember[] members)
{
    return new TypeCodeImpl(this, TCKind._tk_except, id, name, members);
}
 
Example #30
Source File: ORBSingleton.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
public TypeCode create_struct_tc(String id,
                                 String name,
                                 StructMember[] members)
{
    return new TypeCodeImpl(this, TCKind._tk_struct, id, name, members);
}