Java 类org.omg.CORBA.StructMember 实例源码

项目:OpenJSharp    文件:TypeCodeImpl.java   
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
}
项目:openjdk-jdk10    文件:TypeCodeImpl.java   
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
}
项目:openjdk9    文件:TypeCodeImpl.java   
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
}
项目:lookaside_java-1.8.0-openjdk    文件:TypeCodeImpl.java   
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
}
项目:jdk8u_corba    文件:TypeCodeImpl.java   
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
}
项目:javify    文件:StructureToReturnHelper.java   
/**
 * Create the typecode.
 */
public static synchronized TypeCode type()
{
  StructMember[] members = new StructMember[3];
  TypeCode member = OrbRestricted.Singleton.get_primitive_tc(TCKind.tk_long);
  members[0] = new StructMember("n", member, null);
  member = OrbRestricted.Singleton.create_string_tc(0);
  members[1] = new StructMember("c", member, null);
  member = OrbRestricted.Singleton.get_primitive_tc(TCKind.tk_long);
  member = OrbRestricted.Singleton.create_array_tc(3, member);
  members[2] = new StructMember("arra", member, null);
  return OrbRestricted.Singleton.create_struct_tc(
                                                  StructureToReturnHelper.id(),
                                                  "StructureToReturn",
                                                  members);
}
项目:javify    文件:TaggedComponentHelper.java   
/**
 * Create the TaggedComponent typecode (structure, named "TaggedComponent").
 * The typecode states that the structure contains the following fields: tag,
 * component_data.
 */
public static TypeCode type()
{
  ORB orb = OrbRestricted.Singleton;
  StructMember[] members = new StructMember[2];

  TypeCode field;

  field = orb.create_alias_tc("IDL:omg.org/IOP/ComponentId:1.0",
                              "ComponentId",
                              orb.get_primitive_tc(TCKind.tk_ulong));
  members[0] = new StructMember("tag", field, null);

  field = orb.create_sequence_tc(0, orb.get_primitive_tc(TCKind.tk_octet));
  members[1] = new StructMember("component_data", field, null);
  return orb.create_struct_tc(id(), "TaggedComponent", members);
}
项目:javify    文件:ServiceContextHelper.java   
/**
 * Create the ServiceContext typecode (structure, named "ServiceContext"). The
 * typecode states that the structure contains the following fields:
 * context_id, context_data.
 */
public static TypeCode type()
{
  ORB orb = OrbRestricted.Singleton;
  StructMember[] members = new StructMember[2];

  TypeCode field;

  field = orb.create_alias_tc("IDL:omg.org/IOP/ServiceId:1.0", "ServiceId",
                              orb.get_primitive_tc(TCKind.tk_ulong));
  members[0] = new StructMember("context_id", field, null);

  field = orb.create_sequence_tc(0, orb.get_primitive_tc(TCKind.tk_octet));
  members[1] = new StructMember("context_data", field, null);
  return orb.create_struct_tc(id(), "ServiceContext", members);
}
项目:javify    文件:TaggedProfileHelper.java   
/**
 * Create the TaggedProfile typecode (structure, named "TaggedProfile"). The
 * typecode states that the structure contains the following fields: tag,
 * profile_data.
 */
public static TypeCode type()
{
  ORB orb = OrbRestricted.Singleton;
  StructMember[] members = new StructMember[2];

  TypeCode field;

  field = orb.create_alias_tc("IDL:omg.org/IOP/ProfileId:1.0", "ProfileId",
                              orb.get_primitive_tc(TCKind.tk_ulong));
  members[0] = new StructMember("tag", field, null);

  field = orb.create_sequence_tc(0, orb.get_primitive_tc(TCKind.tk_octet));
  members[1] = new StructMember("profile_data", field, null);
  return orb.create_struct_tc(id(), "TaggedProfile", members);
}
项目:javify    文件:NameValuePairHelper.java   
/**
 * Create the NameValuePair typecode (structure,
 * named "NameValuePair").
 * The typecode states that the structure contains the
 * following fields: id, value.
 */
public static TypeCode type()
{
  ORB orb = OrbRestricted.Singleton;
  StructMember[] members = new StructMember[ 2 ];

  TypeCode field;

  field =
    orb.create_alias_tc("IDL:omg.org/DynamicAny/FieldName:1.0",
                        "FieldName",
                        orb.get_primitive_tc(TCKind.tk_string)
    );
  members [ 0 ] = new StructMember("id", field, null);

  field = orb.get_primitive_tc(TCKind.tk_any);
  members [ 1 ] = new StructMember("value", field, null);
  return orb.create_struct_tc(id(), "NameValuePair", members);
}
项目:javify    文件:NameDynAnyPairHelper.java   
/**
 * Create the NameDynAnyPair typecode (structure,
 * named "NameDynAnyPair").
 * The typecode states that the structure contains the
 * following fields: id, value.
 */
public static TypeCode type()
{
  ORB orb = OrbRestricted.Singleton;
  StructMember[] members = new StructMember[ 2 ];

  TypeCode field;

  field =
    orb.create_alias_tc("IDL:omg.org/DynamicAny/FieldName:1.0",
                        "FieldName",
                        orb.get_primitive_tc(TCKind.tk_string)
    );
  members [ 0 ] = new StructMember("id", field, null);

  field = DynAnyHelper.type();
  members [ 1 ] = new StructMember("value", field, null);
  return orb.create_struct_tc(id(), "NameDynAnyPair", members);
}
项目:javify    文件:InvalidPolicyHelper.java   
/**
 * Create the InvalidPolicy typecode (emtpy structure,
 * named "InvalidPolicy").
 * The typecode states that the structure contains the
 * single field, named "index".
 */
public static TypeCode type()
{
  if (typeCode == null)
    {
      ORB orb = OrbRestricted.Singleton;
      StructMember[] members = new StructMember[ 1 ];

      TypeCode field;

      field = orb.get_primitive_tc(TCKind.tk_ushort);
      members [ 0 ] = new StructMember("index", field, null);
      typeCode = orb.create_exception_tc(id(), "InvalidPolicy", members);
    }
  return typeCode;
}
项目:javify    文件:NameComponentHelper.java   
/**
 * Get the type code of the named component.
 */
public static TypeCode type()
{
  ORB orb = OrbRestricted.Singleton;

  StructMember[] members = new StructMember[ 2 ];
  TypeCode member;
  member = orb.create_string_tc(0);
  members [ 0 ] = new StructMember("id", member, null);
  member = orb.create_string_tc(0);
  members [ 1 ] = new StructMember("kind", member, null);
  return
  orb.create_struct_tc(NameComponentHelper.id(), "NameComponent",
                       members
  );
}
项目:javify    文件:OrbRestricted.java   
/** {@inheritDoc} */
public TypeCode create_exception_tc(String id, String name,
  StructMember[] members
)
{
  RecordTypeCode r = new RecordTypeCode(TCKind.tk_except);
  r.setId(id);
  r.setName(name);

  for (int i = 0; i < members.length; i++)
    {
      r.add(members [ i ]);
    }

  return r;
}
项目:javify    文件:OrbRestricted.java   
/** {@inheritDoc} */
public TypeCode create_struct_tc(String id, String name,
  StructMember[] members
)
{
  RecordTypeCode r = new RecordTypeCode(TCKind.tk_struct);
  r.setId(id);
  r.setName(name);

  for (int i = 0; i < members.length; i++)
    {
      r.add(members [ i ]);
    }

  return r;
}
项目:jvm-stm    文件:StructureToReturnHelper.java   
/**
 * Create the typecode.
 */
public static synchronized TypeCode type()
{
  StructMember[] members = new StructMember[3];
  TypeCode member = OrbRestricted.Singleton.get_primitive_tc(TCKind.tk_long);
  members[0] = new StructMember("n", member, null);
  member = OrbRestricted.Singleton.create_string_tc(0);
  members[1] = new StructMember("c", member, null);
  member = OrbRestricted.Singleton.get_primitive_tc(TCKind.tk_long);
  member = OrbRestricted.Singleton.create_array_tc(3, member);
  members[2] = new StructMember("arra", member, null);
  return OrbRestricted.Singleton.create_struct_tc(
                                                  StructureToReturnHelper.id(),
                                                  "StructureToReturn",
                                                  members);
}
项目:jvm-stm    文件:TaggedComponentHelper.java   
/**
 * Create the TaggedComponent typecode (structure, named "TaggedComponent").
 * The typecode states that the structure contains the following fields: tag,
 * component_data.
 */
public static TypeCode type()
{
  ORB orb = OrbRestricted.Singleton;
  StructMember[] members = new StructMember[2];

  TypeCode field;

  field = orb.create_alias_tc("IDL:omg.org/IOP/ComponentId:1.0",
                              "ComponentId",
                              orb.get_primitive_tc(TCKind.tk_ulong));
  members[0] = new StructMember("tag", field, null);

  field = orb.create_sequence_tc(0, orb.get_primitive_tc(TCKind.tk_octet));
  members[1] = new StructMember("component_data", field, null);
  return orb.create_struct_tc(id(), "TaggedComponent", members);
}
项目:jvm-stm    文件:ServiceContextHelper.java   
/**
 * Create the ServiceContext typecode (structure, named "ServiceContext"). The
 * typecode states that the structure contains the following fields:
 * context_id, context_data.
 */
public static TypeCode type()
{
  ORB orb = OrbRestricted.Singleton;
  StructMember[] members = new StructMember[2];

  TypeCode field;

  field = orb.create_alias_tc("IDL:omg.org/IOP/ServiceId:1.0", "ServiceId",
                              orb.get_primitive_tc(TCKind.tk_ulong));
  members[0] = new StructMember("context_id", field, null);

  field = orb.create_sequence_tc(0, orb.get_primitive_tc(TCKind.tk_octet));
  members[1] = new StructMember("context_data", field, null);
  return orb.create_struct_tc(id(), "ServiceContext", members);
}
项目:jvm-stm    文件:TaggedProfileHelper.java   
/**
 * Create the TaggedProfile typecode (structure, named "TaggedProfile"). The
 * typecode states that the structure contains the following fields: tag,
 * profile_data.
 */
public static TypeCode type()
{
  ORB orb = OrbRestricted.Singleton;
  StructMember[] members = new StructMember[2];

  TypeCode field;

  field = orb.create_alias_tc("IDL:omg.org/IOP/ProfileId:1.0", "ProfileId",
                              orb.get_primitive_tc(TCKind.tk_ulong));
  members[0] = new StructMember("tag", field, null);

  field = orb.create_sequence_tc(0, orb.get_primitive_tc(TCKind.tk_octet));
  members[1] = new StructMember("profile_data", field, null);
  return orb.create_struct_tc(id(), "TaggedProfile", members);
}
项目:jvm-stm    文件:NameValuePairHelper.java   
/**
 * Create the NameValuePair typecode (structure,
 * named "NameValuePair").
 * The typecode states that the structure contains the
 * following fields: id, value.
 */
public static TypeCode type()
{
  ORB orb = OrbRestricted.Singleton;
  StructMember[] members = new StructMember[ 2 ];

  TypeCode field;

  field =
    orb.create_alias_tc("IDL:omg.org/DynamicAny/FieldName:1.0",
                        "FieldName",
                        orb.get_primitive_tc(TCKind.tk_string)
    );
  members [ 0 ] = new StructMember("id", field, null);

  field = orb.get_primitive_tc(TCKind.tk_any);
  members [ 1 ] = new StructMember("value", field, null);
  return orb.create_struct_tc(id(), "NameValuePair", members);
}
项目:jvm-stm    文件:NameDynAnyPairHelper.java   
/**
 * Create the NameDynAnyPair typecode (structure,
 * named "NameDynAnyPair").
 * The typecode states that the structure contains the
 * following fields: id, value.
 */
public static TypeCode type()
{
  ORB orb = OrbRestricted.Singleton;
  StructMember[] members = new StructMember[ 2 ];

  TypeCode field;

  field =
    orb.create_alias_tc("IDL:omg.org/DynamicAny/FieldName:1.0",
                        "FieldName",
                        orb.get_primitive_tc(TCKind.tk_string)
    );
  members [ 0 ] = new StructMember("id", field, null);

  field = DynAnyHelper.type();
  members [ 1 ] = new StructMember("value", field, null);
  return orb.create_struct_tc(id(), "NameDynAnyPair", members);
}
项目:jvm-stm    文件:InvalidPolicyHelper.java   
/**
 * Create the InvalidPolicy typecode (emtpy structure,
 * named "InvalidPolicy").
 * The typecode states that the structure contains the
 * single field, named "index".
 */
public static TypeCode type()
{
  if (typeCode == null)
    {
      ORB orb = OrbRestricted.Singleton;
      StructMember[] members = new StructMember[ 1 ];

      TypeCode field;

      field = orb.get_primitive_tc(TCKind.tk_ushort);
      members [ 0 ] = new StructMember("index", field, null);
      typeCode = orb.create_exception_tc(id(), "InvalidPolicy", members);
    }
  return typeCode;
}
项目:jvm-stm    文件:NameComponentHelper.java   
/**
 * Get the type code of the named component.
 */
public static TypeCode type()
{
  ORB orb = OrbRestricted.Singleton;

  StructMember[] members = new StructMember[ 2 ];
  TypeCode member;
  member = orb.create_string_tc(0);
  members [ 0 ] = new StructMember("id", member, null);
  member = orb.create_string_tc(0);
  members [ 1 ] = new StructMember("kind", member, null);
  return
  orb.create_struct_tc(NameComponentHelper.id(), "NameComponent",
                       members
  );
}
项目:jvm-stm    文件:OrbRestricted.java   
/** {@inheritDoc} */
public TypeCode create_exception_tc(String id, String name,
  StructMember[] members
)
{
  RecordTypeCode r = new RecordTypeCode(TCKind.tk_except);
  r.setId(id);
  r.setName(name);

  for (int i = 0; i < members.length; i++)
    {
      r.add(members [ i ]);
    }

  return r;
}
项目:jvm-stm    文件:OrbRestricted.java   
/** {@inheritDoc} */
public TypeCode create_struct_tc(String id, String name,
  StructMember[] members
)
{
  RecordTypeCode r = new RecordTypeCode(TCKind.tk_struct);
  r.setId(id);
  r.setName(name);

  for (int i = 0; i < members.length; i++)
    {
      r.add(members [ i ]);
    }

  return r;
}
项目:infobip-open-jdk-8    文件:TypeCodeImpl.java   
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
}
项目:openjdk-source-code-learn    文件:TypeCodeImpl.java   
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
}
项目:OLD-OpenJDK8    文件:TypeCodeImpl.java   
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
}
项目:JamVM-PH    文件:StructureToReturnHelper.java   
/**
 * Create the typecode.
 */
public static synchronized TypeCode type()
{
  StructMember[] members = new StructMember[3];
  TypeCode member = OrbRestricted.Singleton.get_primitive_tc(TCKind.tk_long);
  members[0] = new StructMember("n", member, null);
  member = OrbRestricted.Singleton.create_string_tc(0);
  members[1] = new StructMember("c", member, null);
  member = OrbRestricted.Singleton.get_primitive_tc(TCKind.tk_long);
  member = OrbRestricted.Singleton.create_array_tc(3, member);
  members[2] = new StructMember("arra", member, null);
  return OrbRestricted.Singleton.create_struct_tc(
                                                  StructureToReturnHelper.id(),
                                                  "StructureToReturn",
                                                  members);
}
项目:JamVM-PH    文件:TaggedComponentHelper.java   
/**
 * Create the TaggedComponent typecode (structure, named "TaggedComponent").
 * The typecode states that the structure contains the following fields: tag,
 * component_data.
 */
public static TypeCode type()
{
  ORB orb = OrbRestricted.Singleton;
  StructMember[] members = new StructMember[2];

  TypeCode field;

  field = orb.create_alias_tc("IDL:omg.org/IOP/ComponentId:1.0",
                              "ComponentId",
                              orb.get_primitive_tc(TCKind.tk_ulong));
  members[0] = new StructMember("tag", field, null);

  field = orb.create_sequence_tc(0, orb.get_primitive_tc(TCKind.tk_octet));
  members[1] = new StructMember("component_data", field, null);
  return orb.create_struct_tc(id(), "TaggedComponent", members);
}
项目:JamVM-PH    文件:ServiceContextHelper.java   
/**
 * Create the ServiceContext typecode (structure, named "ServiceContext"). The
 * typecode states that the structure contains the following fields:
 * context_id, context_data.
 */
public static TypeCode type()
{
  ORB orb = OrbRestricted.Singleton;
  StructMember[] members = new StructMember[2];

  TypeCode field;

  field = orb.create_alias_tc("IDL:omg.org/IOP/ServiceId:1.0", "ServiceId",
                              orb.get_primitive_tc(TCKind.tk_ulong));
  members[0] = new StructMember("context_id", field, null);

  field = orb.create_sequence_tc(0, orb.get_primitive_tc(TCKind.tk_octet));
  members[1] = new StructMember("context_data", field, null);
  return orb.create_struct_tc(id(), "ServiceContext", members);
}
项目:JamVM-PH    文件:TaggedProfileHelper.java   
/**
 * Create the TaggedProfile typecode (structure, named "TaggedProfile"). The
 * typecode states that the structure contains the following fields: tag,
 * profile_data.
 */
public static TypeCode type()
{
  ORB orb = OrbRestricted.Singleton;
  StructMember[] members = new StructMember[2];

  TypeCode field;

  field = orb.create_alias_tc("IDL:omg.org/IOP/ProfileId:1.0", "ProfileId",
                              orb.get_primitive_tc(TCKind.tk_ulong));
  members[0] = new StructMember("tag", field, null);

  field = orb.create_sequence_tc(0, orb.get_primitive_tc(TCKind.tk_octet));
  members[1] = new StructMember("profile_data", field, null);
  return orb.create_struct_tc(id(), "TaggedProfile", members);
}
项目:JamVM-PH    文件:NameValuePairHelper.java   
/**
 * Create the NameValuePair typecode (structure,
 * named "NameValuePair").
 * The typecode states that the structure contains the
 * following fields: id, value.
 */
public static TypeCode type()
{
  ORB orb = OrbRestricted.Singleton;
  StructMember[] members = new StructMember[ 2 ];

  TypeCode field;

  field =
    orb.create_alias_tc("IDL:omg.org/DynamicAny/FieldName:1.0",
                        "FieldName",
                        orb.get_primitive_tc(TCKind.tk_string)
    );
  members [ 0 ] = new StructMember("id", field, null);

  field = orb.get_primitive_tc(TCKind.tk_any);
  members [ 1 ] = new StructMember("value", field, null);
  return orb.create_struct_tc(id(), "NameValuePair", members);
}
项目:JamVM-PH    文件:NameDynAnyPairHelper.java   
/**
 * Create the NameDynAnyPair typecode (structure,
 * named "NameDynAnyPair").
 * The typecode states that the structure contains the
 * following fields: id, value.
 */
public static TypeCode type()
{
  ORB orb = OrbRestricted.Singleton;
  StructMember[] members = new StructMember[ 2 ];

  TypeCode field;

  field =
    orb.create_alias_tc("IDL:omg.org/DynamicAny/FieldName:1.0",
                        "FieldName",
                        orb.get_primitive_tc(TCKind.tk_string)
    );
  members [ 0 ] = new StructMember("id", field, null);

  field = DynAnyHelper.type();
  members [ 1 ] = new StructMember("value", field, null);
  return orb.create_struct_tc(id(), "NameDynAnyPair", members);
}
项目:JamVM-PH    文件:InvalidPolicyHelper.java   
/**
 * Create the InvalidPolicy typecode (emtpy structure,
 * named "InvalidPolicy").
 * The typecode states that the structure contains the
 * single field, named "index".
 */
public static TypeCode type()
{
  if (typeCode == null)
    {
      ORB orb = OrbRestricted.Singleton;
      StructMember[] members = new StructMember[ 1 ];

      TypeCode field;

      field = orb.get_primitive_tc(TCKind.tk_ushort);
      members [ 0 ] = new StructMember("index", field, null);
      typeCode = orb.create_exception_tc(id(), "InvalidPolicy", members);
    }
  return typeCode;
}
项目:JamVM-PH    文件:NameComponentHelper.java   
/**
 * Get the type code of the named component.
 */
public static TypeCode type()
{
  ORB orb = OrbRestricted.Singleton;

  StructMember[] members = new StructMember[ 2 ];
  TypeCode member;
  member = orb.create_string_tc(0);
  members [ 0 ] = new StructMember("id", member, null);
  member = orb.create_string_tc(0);
  members [ 1 ] = new StructMember("kind", member, null);
  return
  orb.create_struct_tc(NameComponentHelper.id(), "NameComponent",
                       members
  );
}
项目:JamVM-PH    文件:OrbRestricted.java   
/** {@inheritDoc} */
public TypeCode create_exception_tc(String id, String name,
  StructMember[] members
)
{
  RecordTypeCode r = new RecordTypeCode(TCKind.tk_except);
  r.setId(id);
  r.setName(name);

  for (int i = 0; i < members.length; i++)
    {
      r.add(members [ i ]);
    }

  return r;
}
项目:JamVM-PH    文件:OrbRestricted.java   
/** {@inheritDoc} */
public TypeCode create_struct_tc(String id, String name,
  StructMember[] members
)
{
  RecordTypeCode r = new RecordTypeCode(TCKind.tk_struct);
  r.setId(id);
  r.setName(name);

  for (int i = 0; i < members.length; i++)
    {
      r.add(members [ i ]);
    }

  return r;
}
项目:openjdk-orb    文件:TypeCodeImpl.java   
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
}
项目:classpath    文件:StructureToReturnHelper.java   
/**
 * Create the typecode.
 */
public static synchronized TypeCode type()
{
  StructMember[] members = new StructMember[3];
  TypeCode member = OrbRestricted.Singleton.get_primitive_tc(TCKind.tk_long);
  members[0] = new StructMember("n", member, null);
  member = OrbRestricted.Singleton.create_string_tc(0);
  members[1] = new StructMember("c", member, null);
  member = OrbRestricted.Singleton.get_primitive_tc(TCKind.tk_long);
  member = OrbRestricted.Singleton.create_array_tc(3, member);
  members[2] = new StructMember("arra", member, null);
  return OrbRestricted.Singleton.create_struct_tc(
                                                  StructureToReturnHelper.id(),
                                                  "StructureToReturn",
                                                  members);
}