Class TypeCodeImpl
- All Implemented Interfaces:
Serializable,IDLEntity
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionTypeCodeImpl(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) -
Method Summary
Modifier and TypeMethodDescriptionReturns theTypeCodeobject that describes the concrete base type of the value type that thisTypeCodeobject describes.Returns theTypeCodeobject representing the IDL type for the members of the object described by thisTypeCodeobject.protected static TypeCodeImplconvertToNative(ORB orb, TypeCode tc) protected voidcopy(InputStream src, OutputStream dst) This is not a copy of the TypeCodeImpl objects, but instead it copies the value this type code is representing.intReturns the index of the default member, or -1 if there is no default member.protected static shortdigits(BigDecimal value) Returns aTypeCodeobject describing all non-default member labels.final booleanCompares thisTypeCodeobject with the given one, testing for equality.booleanequivalent(TypeCode tc) The equivalent operation is used by the ORB when determining type equivalence for values stored in an IDL any.shortReturns the number of digits in the fixed type described by thisTypeCodeobject.shortReturns the scale of the fixed type described by thisTypeCodeobject.Strips out all optional name and member name fields, but leaves all alias typecodes intact.id()Retrieves the RepositoryId globally identifying the type of thisTypeCodeobject.booleankind()Retrieves the kind of thisTypeCodeobject.intlength()Returns the number of elements in the type described by thisTypeCodeobject.intRetrieves the number of members in the type described by thisTypeCodeobject.member_label(int index) Retrieves the label of the union member identified by the given index.member_name(int index) Retrieves the simple name of the member identified by the given index.member_type(int index) Retrieves theTypeCodeobject describing the type of the member identified by the given index.shortmember_visibility(int index) Returns the constant that indicates the visibility of the member at the given index.name()Retrieves the simple name identifying thisTypeCodeobject within its enclosing scope.static CDROutputStreamnewOutputStream(ORB orb) voidvoidprotected static shortscale(BigDecimal value) protected voidsetCaching(boolean enableCaching) toString()shortReturns a constant indicating the modifier of the value type that thisTypeCodeobject describes.voidvoid
-
Field Details
-
tk_indirect
protected static final int tk_indirect- See Also:
-
-
Constructor Details
-
TypeCodeImpl
-
TypeCodeImpl
-
TypeCodeImpl
-
TypeCodeImpl
-
TypeCodeImpl
public TypeCodeImpl(ORB orb, int creationKind, String id, String name, TypeCode discriminator_type, UnionMember[] members) -
TypeCodeImpl
public TypeCodeImpl(ORB orb, int creationKind, String id, String name, short type_modifier, TypeCode concrete_base, ValueMember[] members) -
TypeCodeImpl
-
TypeCodeImpl
-
TypeCodeImpl
-
TypeCodeImpl
-
TypeCodeImpl
-
TypeCodeImpl
-
TypeCodeImpl
-
TypeCodeImpl
-
-
Method Details
-
convertToNative
-
newOutputStream
-
equal
Description copied from class:TypeCodeCompares thisTypeCodeobject with the given one, testing for equality.TypeCodeobjects are equal if they are interchangeable and give identical results whenTypeCodeoperations are applied to them. -
equivalent
The equivalent operation is used by the ORB when determining type equivalence for values stored in an IDL any.- Specified by:
equivalentin classTypeCode- Parameters:
tc- the typecode to compare with this typecode- Returns:
trueif the given typecode is equivalent to this typecode;falseotherwise
-
get_compact_typecode
Description copied from class:TypeCodeStrips out all optional name and member name fields, but leaves all alias typecodes intact.- Specified by:
get_compact_typecodein classTypeCode- Returns:
- a
TypeCodeobject with optional name and member name fields stripped out, except for alias typecodes, which are left intact - See Also:
-
kind
Description copied from class:TypeCodeRetrieves the kind of thisTypeCodeobject. The kind of a type code determines whichTypeCodemethods may legally be invoked on it.The method
kindmay be invoked on anyTypeCodeobject. -
is_recursive
public boolean is_recursive() -
id
Description copied from class:TypeCodeRetrieves the RepositoryId globally identifying the type of thisTypeCodeobject.The method
idcan 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 interfaceTypeCodeobjects always have a RepositoryId. Structure, union, enumeration, and aliasTypeCodeobjects obtained from the Interface Repository or the methodORB.create_operation_listalso always have a RepositoryId. If there is no RepositoryId, the method can return an empty string. -
name
Description copied from class:TypeCodeRetrieves the simple name identifying thisTypeCodeobject within its enclosing scope. Since names are local to a Repository, the name returned from aTypeCodeobject may not match the name of the type in any particular Repository, and may even be an empty string.The method
namecan be invoked on object reference, structure, union, enumeration, alias, exception, valuetype, boxed valuetype, native, and abstract interfaceTypeCodeobjects. -
member_count
Description copied from class:TypeCodeRetrieves the number of members in the type described by thisTypeCodeobject.The method
member_countcan be invoked on structure, union, and enumerationTypeCodeobjects. Java IDL extends the CORBA specification to allow this method to operate on exceptions as well.- Specified by:
member_countin classTypeCode- Returns:
- the number of members constituting the type described
by this
TypeCodeobject - Throws:
BadKind- if the method is invoked on an inappropriate kind ofTypeCodeobject
-
member_name
Description copied from class:TypeCodeRetrieves the simple name of the member identified by the given index. Since names are local to a Repository, the name returned from aTypeCodeobject may not match the name of the member in any particular Repository, and may even be an empty string.The method
member_namecan be invoked on structure, union, and enumerationTypeCodeobjects. Java IDL extends the CORBA specification to allow this method to operate on exceptions as well.- Specified by:
member_namein classTypeCode- Parameters:
index- index of the member for which a name is being reqested- Returns:
- simple name of the member identified by the index or an empty string
- Throws:
BadKind- if the method is invoked on an inappropriate kind ofTypeCodeobjectBounds- if the index is equal to or greater than the number of members constituting the type
-
member_type
Description copied from class:TypeCodeRetrieves theTypeCodeobject describing the type of the member identified by the given index.The method
member_typecan be invoked on structure and unionTypeCodeobjects. Java IDL extends the CORBA specification to allow this method to operate on exceptions as well.- Specified by:
member_typein classTypeCode- Parameters:
index- index of the member for which type information is begin requested- Returns:
- the
TypeCodeobject describing the member at the given index - Throws:
BadKind- if the method is invoked on an inappropriate kind ofTypeCodeobjectBounds- if the index is equal to or greater than the number of members constituting the type
-
member_label
Description copied from class:TypeCodeRetrieves the label of the union member identified by the given index. For the default member, the label is the zero octet.The method
member_labelcan only be invoked on unionTypeCodeobjects.- Specified by:
member_labelin classTypeCode- Parameters:
index- index of the union member for which the label is being requested- Returns:
- an
Anyobject describing the label of the requested union member or the zero octet for the default member - Throws:
BadKind- if the method is invoked on a non-unionTypeCodeobjectBounds- if the index is equal to or greater than the number of members constituting the union
-
discriminator_type
Description copied from class:TypeCodeReturns aTypeCodeobject describing all non-default member labels. The methoddiscriminator_typecan be invoked only on unionTypeCodeobjects.- Specified by:
discriminator_typein classTypeCode- Returns:
- the
TypeCodeobject describing the non-default member labels - Throws:
BadKind- if the method is invoked on a non-unionTypeCodeobject
-
default_index
Description copied from class:TypeCodeReturns the index of the default member, or -1 if there is no default member.The method
default_indexcan be invoked only on unionTypeCodeobjects.- Specified by:
default_indexin classTypeCode- Returns:
- the index of the default member, or -1 if there is no default member
- Throws:
BadKind- if the method is invoked on a non-unionTypeCodeobject
-
length
Description copied from class:TypeCodeReturns the number of elements in the type described by thisTypeCodeobject. 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
lengthcan be invoked on string, sequence, and arrayTypeCodeobjects. -
content_type
Description copied from class:TypeCodeReturns theTypeCodeobject representing the IDL type for the members of the object described by thisTypeCodeobject. For sequences and arrays, it returns the element type. For aliases, it returns the original type. Note that multidimensional arrays are represented by nestingTypeCodeobjects, one per dimension. For boxed valuetypes, it returns the boxed type.The method
content_typecan be invoked on sequence, array, alias, and boxed valuetypeTypeCodeobjects.- Specified by:
content_typein classTypeCode- Returns:
- a
TypeCodeobject representing the element type for sequences and arrays, the original type for aliases, or the boxed type for boxed valuetypes. - Throws:
BadKind- if the method is invoked on an inappropriate kind ofTypeCodeobject
-
fixed_digits
Description copied from class:TypeCodeReturns the number of digits in the fixed type described by thisTypeCodeobject. For example, the typecode for the number 3000.275d could befixed<7,3>, where 7 is the precision and 3 is the scale.- Specified by:
fixed_digitsin classTypeCode- Returns:
- the total number of digits
- Throws:
BadKind- if this method is invoked on an inappropriate kind ofTypeCodeobject
-
fixed_scale
Description copied from class:TypeCodeReturns the scale of the fixed type described by thisTypeCodeobject. A positive number indicates the number of digits to the right of the decimal point. For example, the number 3000d could have the typecodefixed<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.- Specified by:
fixed_scalein classTypeCode- Returns:
- the scale of the fixed type that this
TypeCodeobject describes - Throws:
BadKind- if this method is invoked on an inappropriate kind ofTypeCodeobject
-
member_visibility
Description copied from class:TypeCodeReturns the constant that indicates the visibility of the member at the given index. This operation can only be invoked on non-boxed valueTypeCodeobjects.- Specified by:
member_visibilityin classTypeCode- Parameters:
index- anintindicating the index into the value- Returns:
- either
PRIVATE_MEMBER.valueorPUBLIC_MEMBER.value - Throws:
BadKind- if this method is invoked on a non-value typeTypeCodeobjectBounds- if the given index is out of bounds- See Also:
-
type_modifier
Description copied from class:TypeCodeReturns a constant indicating the modifier of the value type that thisTypeCodeobject describes. The constant returned must be one of the following:VM_NONE.value,VM_ABSTRACT.value,VM_CUSTOM.value, orVM_TRUNCATABLE.value,- Specified by:
type_modifierin classTypeCode- Returns:
- a constant describing the value type
that this
TypeCodeobject describes - Throws:
BadKind- if this method is invoked on a non-value typeTypeCodeobject- See Also:
-
concrete_base_type
Description copied from class:TypeCodeReturns theTypeCodeobject that describes the concrete base type of the value type that thisTypeCodeobject describes. Returns null if it doesn't have a concrete base type.- Specified by:
concrete_base_typein classTypeCode- Returns:
- the
TypeCodeobject that describes the concrete base type of the value type that thisTypeCodeobject describes - Throws:
BadKind- if this method is invoked on a non-boxed value typeTypeCodeobject- See Also:
-
read_value
-
write_value
-
write_value
-
copy
This is not a copy of the TypeCodeImpl objects, but instead it copies the value this type code is representing. See AnyImpl read_value and write_value for usage. The state of this TypeCodeImpl instance isn't changed, only used by the Any to do the correct copy. -
digits
-
scale
-
description
-
toString
-
printStream
-
setCaching
protected void setCaching(boolean enableCaching)
-