org.jacorb.orb

Class TypeCode

public class TypeCode extends TypeCode

JacORB implementation of CORBA TypeCodes

Version: $Id: TypeCode.java,v 1.48 2006/07/10 13:34:12 alphonse.bendt Exp $

Author: Gerald Brose, FU Berlin

Constructor Summary
TypeCode(int _kind)
Constructor for primitive types, called only from static initializer and org.jacorb.ir.TypeCodeUtil
TypeCode(String id)
Constructor for recursive types
TypeCode(int _kind, String _id, String _name, StructMember[] _members)
Constructor for tk_struct and tk_except
TypeCode(String _id, String _name, TypeCode _discriminator_type, UnionMember[] _members)
Constructor for tk_union
TypeCode(String _id, String _name, String[] _members)
Constructor for tk_enum
TypeCode(int _kind, String _id, String _name, TypeCode _original_type)
Constructor for tk_alias, tk_value_box
TypeCode(int _kind, String _id, String _name)
Constructor for tk_objref, tk_abstract_interface, tk_native, tk_local_interface
TypeCode(int _kind, int _bound)
Constructor for tk_string, tk_wstring
TypeCode(int _kind, int _bound, TypeCode _element_type)
Constructor for tk_sequence, tk_array
TypeCode(short _digits, short _scale)
Constructor for tk_fixed
TypeCode(String id, String _name, short type_modifier, TypeCode concrete_base, ValueMember[] members)
Constructor for tk_value
Method Summary
TypeCodeconcrete_base_type()
TypeCodecontent_type()
static TypeCodecreate_tc(Class clazz)
Creates a TypeCode for an arbitrary Java class.
intdefault_index()
TypeCodediscriminator_type()
booleanequal(TypeCode tc)
check TypeCodes for equality
booleanequivalent(TypeCode tc)
less strict equivalence check, unwinds aliases
shortfixed_digits()
shortfixed_scale()
TypeCodeget_compact_typecode()
get_compact_typecode returns a new TypeCode with all type and member information removed.
Stringid()
static StringidlTypeName(TypeCode typeCode)
convenience method
StringidlTypeName()
convenience method
static booleanisRecursive(TypeCode typeCode)
booleanis_primitive()
booleanis_recursive()
TCKindkind()
intlength()
intmember_count()
Anymember_label(int index)
Stringmember_name(int index)
TypeCodemember_type(int index)
shortmember_visibility(int index)
Stringname()
static TypeCodeoriginalType(TypeCode typeCode)
StringtoString()
shorttype_modifier()
int_kind()

Constructor Detail

TypeCode

public TypeCode(int _kind)
Constructor for primitive types, called only from static initializer and org.jacorb.ir.TypeCodeUtil

TypeCode

public TypeCode(String id)
Constructor for recursive types

TypeCode

public TypeCode(int _kind, String _id, String _name, StructMember[] _members)
Constructor for tk_struct and tk_except

TypeCode

public TypeCode(String _id, String _name, TypeCode _discriminator_type, UnionMember[] _members)
Constructor for tk_union

TypeCode

public TypeCode(String _id, String _name, String[] _members)
Constructor for tk_enum

TypeCode

public TypeCode(int _kind, String _id, String _name, TypeCode _original_type)
Constructor for tk_alias, tk_value_box

TypeCode

public TypeCode(int _kind, String _id, String _name)
Constructor for tk_objref, tk_abstract_interface, tk_native, tk_local_interface

TypeCode

public TypeCode(int _kind, int _bound)
Constructor for tk_string, tk_wstring

TypeCode

public TypeCode(int _kind, int _bound, TypeCode _element_type)
Constructor for tk_sequence, tk_array

TypeCode

public TypeCode(short _digits, short _scale)
Constructor for tk_fixed

TypeCode

public TypeCode(String id, String _name, short type_modifier, TypeCode concrete_base, ValueMember[] members)
Constructor for tk_value

Method Detail

concrete_base_type

public TypeCode concrete_base_type()

content_type

public TypeCode content_type()

create_tc

public static TypeCode create_tc(Class clazz)
Creates a TypeCode for an arbitrary Java class. Right now, this only covers RMI classes, not those derived from IDL.

default_index

public int default_index()

discriminator_type

public TypeCode discriminator_type()

equal

public boolean equal(TypeCode tc)
check TypeCodes for equality

equivalent

public boolean equivalent(TypeCode tc)
less strict equivalence check, unwinds aliases

fixed_digits

public short fixed_digits()

fixed_scale

public short fixed_scale()

get_compact_typecode

public TypeCode get_compact_typecode()
get_compact_typecode returns a new TypeCode with all type and member information removed. RepositoryID and alias are preserved. This method effectively clones the original typecode - simpler than trying to work out what type so what to duplicate (and compact).

Returns: an org.omg.CORBA.TypeCode value

id

public String id()

idlTypeName

public static String idlTypeName(TypeCode typeCode)
convenience method

idlTypeName

public String idlTypeName()
convenience method

isRecursive

public static boolean isRecursive(TypeCode typeCode)

Returns: TRUE if the argument is a JacORB typecode and is recursive.

is_primitive

public boolean is_primitive()

Returns: True if this TypeCode represents a primitive type, false otherwise

is_recursive

public boolean is_recursive()

Returns: TRUE is this TypeCode is recursive. Both the initial place holder TypeCode and the real TypeCode which replaces the place holder return TRUE.

kind

public TCKind kind()

length

public int length()

member_count

public int member_count()

member_label

public Any member_label(int index)

member_name

public String member_name(int index)

member_type

public TypeCode member_type(int index)

member_visibility

public short member_visibility(int index)

name

public String name()

originalType

public static final TypeCode originalType(TypeCode typeCode)

Returns: the content type if the argument is an alias, or the argument itself otherwise

toString

public String toString()

type_modifier

public short type_modifier()

_kind

public int _kind()