All Packages Class Hierarchy This Package Previous Next Index
Class org.omg.CORBA.TypeCode
java.lang.Object
|
+----org.omg.CORBA.TypeCode
- public abstract class TypeCode
- extends Object
- Java Class org.omg.CORBA.TypeCode
- Source File org/omg/CORBA/TypeCode.java
- IDL Source File corba.idl
- IDL Absolute Name ::CORBA::TypeCode
- Repository Identifier IDL:omg.org/CORBA/TypeCode:1.0
IDL definition:
interface TypeCode {
exception Bounds {
};
exception BadKind {
};
boolean equal(
in ::CORBA::TypeCode tc
);
::CORBA::TCKind kind();
::CORBA::RepositoryId id(
)
raises(
::CORBA::TypeCode::BadKind
);
::CORBA::Identifier name(
)
raises(
::CORBA::TypeCode::BadKind
);
unsigned long member_count(
)
raises(
::CORBA::TypeCode::BadKind
);
::CORBA::Identifier member_name(
in unsigned long index
)
raises(
::CORBA::TypeCode::BadKind,
::CORBA::TypeCode::Bounds
);
::CORBA::TypeCode member_type(
in unsigned long index
)
raises(
::CORBA::TypeCode::BadKind,
::CORBA::TypeCode::Bounds
);
any member_label(
in unsigned long index
)
raises(
::CORBA::TypeCode::BadKind,
::CORBA::TypeCode::Bounds
);
::CORBA::TypeCode discriminator_type(
)
raises(
::CORBA::TypeCode::BadKind
);
long default_index(
)
raises(
::CORBA::TypeCode::BadKind
);
unsigned long length(
)
raises(
::CORBA::TypeCode::BadKind
);
::CORBA::TypeCode content_type(
)
raises(
::CORBA::TypeCode::BadKind
);
};
The TypeCode interface describes types defined in IDL. These types
can be examined and created at runtime. They can also be passed as
parameters in operations. Type codes are mostly used to describe
the type of value being stored in an any object. Type codes are
created via the ORB interface. Type codes for all build in types (e.g.,
float, etc.) are provided in the TCKind class.
- See Also:
- ORB, get_primitive_tc, Any, TCKind
-
TypeCode()
-
-
content_type()
-
Returns the type of contained elements of container types,
or returns the aliased type.
-
default_index()
-
Returns the default index of the union.
-
discriminator_type()
-
Returns the type of the union discriminator.
-
equal(TypeCode)
-
Returns true if the type code is type equivalent to tc,
false otherwise.
-
id()
-
Returns the repository identifier of the type code.
-
kind()
-
Returns the kind of the type code.
-
length()
-
Returns the number of elements contained by the type.
-
member_count()
-
Returns the number of member in the type.
-
member_label(int)
-
Returns the label of member index.
-
member_name(int)
-
Returns the name of member index.
-
member_type(int)
-
Returns the type of member index.
-
name()
-
Returns the unscoped type name.
TypeCode
public TypeCode()
equal
public abstract boolean equal(TypeCode tc)
- Returns true if the type code is type equivalent to tc,
false otherwise. Type equivalence is determined by the structure
of the types, not by their names. Thus two structures with the
same fields (declared in the same order) are considered type
equivalent.
Operation: ::CORBA::TypeCode::equal.
boolean equal(
in ::CORBA::TypeCode tc
);
- Parameters:
- tc - The type code being compared.
kind
public abstract TCKind kind()
- Returns the kind of the type code. Type code kind constants are
defined in TCKind.
Operation: ::CORBA::TypeCode::kind.
::CORBA::TCKind kind();
- See Also:
- TCKind
id
public abstract String id() throws BadKind
- Returns the repository identifier of the type code. This is
defined by the IDL used to define the type.
Operation: ::CORBA::TypeCode::id.
::CORBA::RepositoryId id(
)
raises(
::CORBA::TypeCode::BadKind
);
- Throws: BadKind
- If the type code does not have
have a name.
name
public abstract String name() throws BadKind
- Returns the unscoped type name. This method is only valid
for the following type code kinds:
tk_objref, tk_struct, tk_union, tk_enum, tk_alias, and tk_except.
Operation: ::CORBA::TypeCode::name.
::CORBA::Identifier name(
)
raises(
::CORBA::TypeCode::BadKind
);
- Throws: BadKind
- If the type code is not one of the
specified kinds.
member_count
public abstract int member_count() throws BadKind
- Returns the number of member in the type.
This method is only valid for the following type code kinds:
tk_struct, tk_union, tk_enum, and tk_except
Operation: ::CORBA::TypeCode::member_count.
unsigned long member_count(
)
raises(
::CORBA::TypeCode::BadKind
);
- Throws: BadKind
- If the type code is not one of the
specified kinds.
member_name
public abstract String member_name(int index) throws BadKind, Bounds
- Returns the name of member index.
This method is only valid for the following type code kinds:
tk_struct, tk_union, tk_enum, and tk_except
Operation: ::CORBA::TypeCode::member_name.
::CORBA::Identifier member_name(
in unsigned long index
)
raises(
::CORBA::TypeCode::BadKind,
::CORBA::TypeCode::Bounds
);
- Throws: BadKind
- If the type code is not one of the
specified kinds.
- Throws: Bounds
- If the index parameter is
out of range.
member_type
public abstract TypeCode member_type(int index) throws BadKind, Bounds
- Returns the type of member index.
This method is only valid for the following type code kinds:
tk_struct, tk_union, and tk_except
Operation: ::CORBA::TypeCode::member_type.
::CORBA::TypeCode member_type(
in unsigned long index
)
raises(
::CORBA::TypeCode::BadKind,
::CORBA::TypeCode::Bounds
);
- Throws: BadKind
- If the type code is not one of the
specified kinds.
- Throws: Bounds
- If the index parameter is
out of range.
member_label
public abstract Any member_label(int index) throws BadKind, Bounds
- Returns the label of member index. E.g., the label of
the case statement.
This method is only valid for the following type code kinds:
tk_union
Operation: ::CORBA::TypeCode::member_label.
any member_label(
in unsigned long index
)
raises(
::CORBA::TypeCode::BadKind,
::CORBA::TypeCode::Bounds
);
- Throws: BadKind
- If the type code is not one of the
specified kinds.
- Throws: Bounds
- If the index parameter is
out of range.
discriminator_type
public abstract TypeCode discriminator_type() throws BadKind
- Returns the type of the union discriminator.
This method is only valid for the following type code kinds:
tk_union
Operation: ::CORBA::TypeCode::discriminator_type.
::CORBA::TypeCode discriminator_type(
)
raises(
::CORBA::TypeCode::BadKind
);
- Throws: BadKind
- If the type code is not one of the
specified kinds.
default_index
public abstract int default_index() throws BadKind
- Returns the default index of the union.
This method is only valid for the following type code kinds:
tk_union
Operation: ::CORBA::TypeCode::default_index.
long default_index(
)
raises(
::CORBA::TypeCode::BadKind
);
- Throws: BadKind
- If the type code is not one of the
specified kinds.
length
public abstract int length() throws BadKind
- Returns the number of elements contained by the type. Returns
zero if the number of elements is unbounded, for strings and
sequences.
This method is only valid for the following type code kinds:
tk_string, tk_sequence, and tk_array
Operation: ::CORBA::TypeCode::length.
unsigned long length(
)
raises(
::CORBA::TypeCode::BadKind
);
- Throws: BadKind
- If the type code is not one of the
specified kinds.
content_type
public abstract TypeCode content_type() throws BadKind
- Returns the type of contained elements of container types,
or returns the aliased type.
This method is only valid for the following type code kinds:
tk_sequence, tk_array, and tk_alias
Operation: ::CORBA::TypeCode::content_type.
::CORBA::TypeCode content_type(
)
raises(
::CORBA::TypeCode::BadKind
);
- Throws: BadKind
- If the type code is not one of the
specified kinds.
All Packages Class Hierarchy This Package Previous Next Index