public final class TypeCodeImpl extends TypeCode
Modifier and Type | Field and Description |
---|---|
protected static int |
tk_indirect |
Constructor and Description |
---|
TypeCodeImpl(ORB orb) |
TypeCodeImpl(ORB orb,
int creationKind) |
TypeCodeImpl(ORB orb,
int creationKind,
int bound) |
TypeCodeImpl(ORB orb,
int creationKind,
int bound,
int offset) |
TypeCodeImpl(ORB orb,
int creationKind,
int bound,
TypeCode element_type) |
TypeCodeImpl(ORB orb,
int creationKind,
short digits,
short scale) |
TypeCodeImpl(ORB orb,
int creationKind,
String id,
String name) |
TypeCodeImpl(ORB orb,
int creationKind,
String id,
String name,
short type_modifier,
TypeCode concrete_base,
ValueMember[] members) |
TypeCodeImpl(ORB orb,
int creationKind,
String id,
String name,
String[] members) |
TypeCodeImpl(ORB orb,
int creationKind,
String id,
String name,
StructMember[] members) |
TypeCodeImpl(ORB orb,
int creationKind,
String id,
String name,
TypeCode original_type) |
TypeCodeImpl(ORB orb,
int creationKind,
String id,
String name,
TypeCode discriminator_type,
UnionMember[] members) |
TypeCodeImpl(ORB orb,
String id) |
TypeCodeImpl(ORB orb,
TypeCode tc) |
Modifier and Type | Method and Description |
---|---|
TypeCode |
concrete_base_type()
Returns the
TypeCode object that describes the concrete base type
of the value type that this TypeCode object describes. |
TypeCode |
content_type()
Returns the
TypeCode object representing the
IDL type for the members of the object described by this
TypeCode object. |
protected static TypeCodeImpl |
convertToNative(ORB orb,
TypeCode tc) |
protected void |
copy(InputStream src,
OutputStream dst)
This is not a copy of the TypeCodeImpl objects, but instead it
copies the value this type code is representing.
|
int |
default_index()
Returns the index of the
default member, or -1 if there is no default member.
|
String |
description() |
protected static short |
digits(BigDecimal value) |
TypeCode |
discriminator_type()
Returns a
TypeCode object describing
all non-default member labels. |
boolean |
equal(TypeCode tc)
Compares this
TypeCode object with the given one,
testing for equality. |
boolean |
equivalent(TypeCode tc)
The equivalent operation is used by the ORB when determining type equivalence
for values stored in an IDL any.
|
short |
fixed_digits()
Returns the number of digits in the fixed type described by this
TypeCode object. |
short |
fixed_scale()
Returns the scale of the fixed type described by this
TypeCode object. |
TypeCode |
get_compact_typecode()
Strips out all optional name and member name fields,
but leaves all alias typecodes intact.
|
String |
id()
Retrieves the RepositoryId globally identifying the type
of this
TypeCode object. |
boolean |
is_recursive() |
TCKind |
kind()
Retrieves the kind of this
TypeCode object. |
int |
length()
Returns the number of elements in the type described by
this
TypeCode object. |
int |
member_count()
Retrieves the number of members in the type described by
this
TypeCode object. |
Any |
member_label(int index)
Retrieves the label of the union member
identified by the given index.
|
String |
member_name(int index)
Retrieves the simple name of the member identified by
the given index.
|
TypeCode |
member_type(int index)
Retrieves the
TypeCode object describing the type
of the member identified by the given index. |
short |
member_visibility(int index)
Returns the constant that indicates the visibility of the member
at the given index.
|
String |
name()
Retrieves the simple name identifying this
TypeCode
object within its
enclosing scope. |
static CDROutputStream |
newOutputStream(ORB orb) |
void |
printStream(PrintStream s) |
void |
read_value(InputStream is) |
protected static short |
scale(BigDecimal value) |
protected void |
setCaching(boolean enableCaching) |
String |
toString() |
short |
type_modifier()
Returns a constant indicating the modifier of the value type
that this
TypeCode object describes. |
void |
write_value(OutputStream os) |
void |
write_value(TypeCodeOutputStream tcos) |
protected static final int tk_indirect
public TypeCodeImpl(ORB orb)
public TypeCodeImpl(ORB orb, int creationKind)
public TypeCodeImpl(ORB orb, int creationKind, String id, String name, StructMember[] members)
public TypeCodeImpl(ORB orb, int creationKind, String id, String name, TypeCode discriminator_type, UnionMember[] members)
public TypeCodeImpl(ORB orb, int creationKind, String id, String name, short type_modifier, TypeCode concrete_base, ValueMember[] members)
public TypeCodeImpl(ORB orb, int creationKind, String id, String name, String[] members)
public TypeCodeImpl(ORB orb, int creationKind, String id, String name, TypeCode original_type)
public TypeCodeImpl(ORB orb, int creationKind, int bound)
public TypeCodeImpl(ORB orb, int creationKind, int bound, int offset)
public TypeCodeImpl(ORB orb, int creationKind, short digits, short scale)
protected static TypeCodeImpl convertToNative(ORB orb, TypeCode tc)
public static CDROutputStream newOutputStream(ORB orb)
public final boolean equal(TypeCode tc)
TypeCode
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.public boolean equivalent(TypeCode tc)
equivalent
in class TypeCode
tc
- the typecode to compare with this typecodetrue
if the given typecode is equivalent to
this typecode; false
otherwisepublic TypeCode get_compact_typecode()
TypeCode
get_compact_typecode
in class 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 TCKind kind()
TypeCode
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.
public boolean is_recursive()
public String id() throws BadKind
TypeCode
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.
public String name() throws BadKind
TypeCode
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.
public int member_count() throws BadKind
TypeCode
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.
member_count
in class TypeCode
TypeCode
objectBadKind
- if the method
is invoked on an inappropriate kind of TypeCode
objectpublic String member_name(int index) throws BadKind, Bounds
TypeCode
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.
member_name
in class TypeCode
index
- index of the member for which a name is being reqestedBadKind
- if the method
is invoked on an inappropriate kind of TypeCode
objectBounds
- if the index is equal
to or greater than
the number of members constituting the typepublic TypeCode member_type(int index) throws BadKind, Bounds
TypeCode
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.
member_type
in class TypeCode
index
- index of the member for which type information
is begin requestedTypeCode
object describing the
member at the given indexBadKind
- if the method
is invoked on an inappropriate kind of TypeCode
objectBounds
- if the index is
equal to or greater than
the number of members constituting the typepublic Any member_label(int index) throws BadKind, Bounds
TypeCode
The method member_label
can only be invoked on union
TypeCode
objects.
member_label
in class TypeCode
index
- index of the union member for which the
label is being requestedAny
object describing the label of
the requested union member or the zero octet for
the default memberBadKind
- if the method
is invoked on a non-union TypeCode
objectBounds
- if the index is
equal to or greater than
the number of members constituting the unionpublic TypeCode discriminator_type() throws BadKind
TypeCode
TypeCode
object describing
all non-default member labels.
The method discriminator_type
can be invoked only
on union TypeCode
objects.discriminator_type
in class TypeCode
TypeCode
object describing
the non-default member labelsBadKind
- if the method
is invoked on a non-union TypeCode
objectpublic int default_index() throws BadKind
TypeCode
The method default_index
can be invoked only on union
TypeCode
objects.
default_index
in class TypeCode
BadKind
- if the method
is invoked on a non-union TypeCode
objectpublic int length() throws BadKind
TypeCode
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.
public TypeCode content_type() throws BadKind
TypeCode
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.
content_type
in class TypeCode
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 short fixed_digits() throws BadKind
TypeCode
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.fixed_digits
in class TypeCode
BadKind
- if this method
is invoked on an inappropriate kind of TypeCode
objectpublic short fixed_scale() throws BadKind
TypeCode
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.fixed_scale
in class TypeCode
TypeCode
object describesBadKind
- if this method
is invoked on an inappropriate kind of TypeCode
objectpublic short member_visibility(int index) throws BadKind, Bounds
TypeCode
TypeCode
objects.member_visibility
in class TypeCode
index
- an int
indicating the index into the
valuePRIVATE_MEMBER.value
or
PUBLIC_MEMBER.value
BadKind
- if this method
is invoked on a non-value type TypeCode
objectBounds
- if the given index is out of boundsCORBA
package
comments for unimplemented featurespublic short type_modifier() throws BadKind
TypeCode
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
,type_modifier
in class TypeCode
TypeCode
object describesBadKind
- if this method
is invoked on a non-value type TypeCode
objectCORBA
package
comments for unimplemented featurespublic TypeCode concrete_base_type() throws BadKind
TypeCode
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.concrete_base_type
in class TypeCode
TypeCode
object that describes the
concrete base type of the value type
that this TypeCode
object describesBadKind
- if this method
is invoked on a non-boxed value type TypeCode
objectCORBA
package
comments for unimplemented featurespublic void read_value(InputStream is)
public void write_value(OutputStream os)
public void write_value(TypeCodeOutputStream tcos)
protected void copy(InputStream src, OutputStream dst)
protected static short digits(BigDecimal value)
protected static short scale(BigDecimal value)
public String description()
public void printStream(PrintStream s)
protected void setCaching(boolean enableCaching)
Copyright © 2016 JBoss by Red Hat. All rights reserved.