|
Préférences
Moteurs de recherche
|
||||||||||||||||||||||||||||||||||||||||||||||
JavaTM 2 Platform Std. Ed. v1.6.0
org.omg.CORBA
|
Constructor Summary | |
---|---|
TypeCode()
|
Method Summary | |
---|---|
abstract TypeCode |
concrete_base_type()
Returns the TypeCode object that describes the concrete base type
of the value type that this TypeCode object describes. |
abstract TypeCode |
content_type()
Returns the TypeCode object representing the
IDL type for the members of the object described by this
TypeCode object. |
abstract int |
default_index()
Returns the index of the default member, or -1 if there is no default member. |
abstract TypeCode |
discriminator_type()
Returns a TypeCode object describing
all non-default member labels. |
abstract boolean |
equal(TypeCode tc)
Compares this TypeCode object with the given one,
testing for equality. |
abstract boolean |
equivalent(TypeCode tc)
Tests to see if the given TypeCode object is
equivalent to this TypeCode object. |
abstract short |
fixed_digits()
Returns the number of digits in the fixed type described by this TypeCode object. |
abstract short |
fixed_scale()
Returns the scale of the fixed type described by this TypeCode object. |
abstract TypeCode |
get_compact_typecode()
Strips out all optional name and member name fields, but leaves all alias typecodes intact. |
abstract String |
id()
Retrieves the RepositoryId globally identifying the type of this TypeCode object. |
abstract TCKind |
kind()
Retrieves the kind of this TypeCode object. |
abstract int |
length()
Returns the number of elements in the type described by this TypeCode object. |
abstract int |
member_count()
Retrieves the number of members in the type described by this TypeCode object. |
abstract Any |
member_label(int index)
Retrieves the label of the union member identified by the given index. |
abstract String |
member_name(int index)
Retrieves the simple name of the member identified by the given index. |
abstract TypeCode |
member_type(int index)
Retrieves the TypeCode object describing the type
of the member identified by the given index. |
abstract short |
member_visibility(int index)
Returns the constant that indicates the visibility of the member at the given index. |
abstract String |
name()
Retrieves the simple name identifying this TypeCode
object within its
enclosing scope. |
abstract short |
type_modifier()
Returns a constant indicating the modifier of the value type that this TypeCode object describes. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TypeCode()
Method Detail |
---|
public abstract boolean equal(TypeCode tc)
TypeCode
object with the given one,
testing for equality. TypeCode
objects are equal if
they are interchangeable and give identical results when
TypeCode
operations are applied to them.
tc
- the TypeCode
object to compare against
true
if the type codes are equal;
false
otherwisepublic abstract boolean equivalent(TypeCode tc)
TypeCode
object is
equivalent to this TypeCode
object.
tc
- the typecode to compare with this typecode
true
if the given typecode is equivalent to
this typecode; false
otherwisepublic abstract TypeCode get_compact_typecode()
TypeCode
object with optional name and
member name fields stripped out, except for alias typecodes,
which are left intactCORBA
package
comments for unimplemented featurespublic abstract TCKind kind()
TypeCode
object.
The kind of a type code determines which TypeCode
methods may legally be invoked on it.
The method kind
may be invoked on any
TypeCode
object.
TCKind
instance indicating the
value of the kind
field of this
TypeCode
objectpublic abstract String id() throws BadKind
TypeCode
object.
The method id
can be invoked on object reference,
structure, union, enumeration, alias, exception, valuetype,
boxed valuetype, native, and abstract interface type codes.
Object reference, exception, valuetype, boxed valuetype,
native, and abstract interface TypeCode
objects
always have a RepositoryId.
Structure, union, enumeration, and alias TypeCode
objects
obtained from the Interface Repository or the method
ORB.create_operation_list
also always have a RepositoryId. If there is no RepositoryId, the
method can return an empty string.
TypeCode
object
or an empty string if there is no RepositoryID
BadKind
- if the method
is invoked on an inappropriate kind ofTypeCode
objectpublic abstract String name() throws BadKind
TypeCode
object within its
enclosing scope. Since names are local to a Repository, the
name returned from a TypeCode
object
may not match the name of the
type in any particular Repository, and may even be an empty
string.
The method name
can be invoked on object reference,
structure, union, enumeration, alias, exception, valuetype,
boxed valuetype, native, and abstract interface
TypeCode
objects.
TypeCode
object
or an empty string
BadKind
- if the method
is invoked on an inappropriate kind ofTypeCode
objectpublic abstract int member_count() throws BadKind
TypeCode
object.
The method member_count
can be invoked on
structure, union, and enumeration TypeCode
objects.
Java IDL extends the CORBA specification to allow this method to
operate on exceptions as well.
TypeCode
object
BadKind
- if the method
is invoked on an inappropriate kind of TypeCode
objectpublic abstract String member_name(int index) throws BadKind, Bounds
TypeCode
object
may not match the name of the member in any particular
Repository, and may even be an empty string.
The method member_name
can be invoked on structure, union,
and enumeration TypeCode
objects.
Java IDL extends the CORBA specification to allow this method to
operate on exceptions as well.
index
- index of the member for which a name is being reqested
Bounds
- if the index is equal
to or greater than
the number of members constituting the type
BadKind
- if the method
is invoked on an inappropriate kind of TypeCode
objectpublic abstract TypeCode member_type(int index) throws BadKind, Bounds
TypeCode
object describing the type
of the member identified by the given index.
The method member_type
can be invoked on structure
and union TypeCode
objects.
Java IDL extends the CORBA specification to allow this method to
operate on exceptions as well.
index
- index of the member for which type information
is begin requested
TypeCode
object describing the
member at the given index
Bounds
- if the index is
equal to or greater than
the number of members constituting the type
BadKind
- if the method
is invoked on an inappropriate kind of TypeCode
objectpublic abstract Any member_label(int index) throws BadKind, Bounds
The method member_label
can only be invoked on union
TypeCode
objects.
index
- index of the union member for which the
label is being requested
Any
object describing the label of
the requested union member or the zero octet for
the default member
Bounds
- if the index is
equal to or greater than
the number of members constituting the union
BadKind
- if the method
is invoked on a non-union TypeCode
objectpublic abstract TypeCode discriminator_type() throws BadKind
TypeCode
object describing
all non-default member labels.
The method discriminator_type
can be invoked only
on union TypeCode
objects.
TypeCode
object describing
the non-default member labels
BadKind
- if the method
is invoked on a non-union TypeCode
objectpublic abstract int default_index() throws BadKind
The method default_index
can be invoked only on union
TypeCode
objects.
BadKind
- if the method
is invoked on a non-union TypeCode
objectpublic abstract int length() throws BadKind
TypeCode
object.
For strings and sequences, it returns the
bound, with zero indicating an unbounded string or sequence.
For arrays, it returns the number of elements in the array.
The method length
can be invoked on string, sequence, and
array TypeCode
objects.
BadKind
- if the method
is invoked on an inappropriate kind of TypeCode
objectpublic abstract TypeCode content_type() throws BadKind
TypeCode
object representing the
IDL type for the members of the object described by this
TypeCode
object.
For sequences and arrays, it returns the
element type. For aliases, it returns the original type. Note
that multidimensional arrays are represented by nesting
TypeCode
objects, one per dimension.
For boxed valuetypes, it returns the boxed type.
The method content_type
can be invoked on sequence, array,
alias, and boxed valuetype TypeCode
objects.
TypeCode
object representing
the element type for sequences and arrays, the
original type for aliases, or the
boxed type for boxed valuetypes.
BadKind
- if the method
is invoked on an inappropriate kind of TypeCode
objectpublic abstract short fixed_digits() throws BadKind
TypeCode
object. For example, the typecode for
the number 3000.275d could be fixed<7,3>
, where
7 is the precision and 3 is the scale.
BadKind
- if this method
is invoked on an inappropriate kind of TypeCode
objectpublic abstract short fixed_scale() throws BadKind
TypeCode
object. A positive number indicates the
number of digits to the right of the decimal point.
For example, the number 3000d could have the
typecode fixed<4,0>
, where the first number is
the precision and the second number is the scale.
A negative number is also possible and adds zeroes to the
left of the decimal point. In this case, fixed<1,-3>
,
could be the typecode for the number 3000d.
TypeCode
object describes
BadKind
- if this method
is invoked on an inappropriate kind of TypeCode
objectpublic abstract short member_visibility(int index) throws BadKind, Bounds
TypeCode
objects.
index
- an int
indicating the index into the
value
PRIVATE_MEMBER.value
or
PUBLIC_MEMBER.value
BadKind
- if this method
is invoked on a non-value type TypeCode
object
Bounds
- if the given index is out of boundsCORBA
package
comments for unimplemented featurespublic abstract short type_modifier() throws BadKind
TypeCode
object describes. The constant
returned must be one of the following: VM_NONE.value
,
VM_ABSTRACT.value
, VM_CUSTOM.value
,
or VM_TRUNCATABLE.value
,
TypeCode
object describes
BadKind
- if this method
is invoked on a non-value type TypeCode
objectCORBA
package
comments for unimplemented featurespublic abstract TypeCode concrete_base_type() throws BadKind
TypeCode
object that describes the concrete base type
of the value type that this TypeCode
object describes.
Returns null if it doesn't have a concrete base type.
TypeCode
object that describes the
concrete base type of the value type
that this TypeCode
object describes
BadKind
- if this method
is invoked on a non-boxed value type TypeCode
objectCORBA
package
comments for unimplemented features