Package org.omg.CORBA
Class TypeCodeHolder
java.lang.Object
org.omg.CORBA.TypeCodeHolder
- All Implemented Interfaces:
Streamable
The Holder for TypeCode. For more information on
Holder files, see
"Generated Files: Holder Files".
A Holder class for a TypeCode object
that is used to store "out" and "inout" parameters in IDL operations.
If an IDL operation signature has an IDL TypeCode as an "out"
or "inout" parameter, the programmer must pass an instance of
TypeCodeHolder as the corresponding
parameter in the method invocation; for "inout" parameters, the programmer
must also fill the "in" value to be sent to the server.
Before the method invocation returns, the ORB will fill in the
value corresponding to the "out" value returned from the server.
If myTypeCodeHolder is an instance of TypeCodeHolder,
the value stored in its value field can be accessed with
myTypeCodeHolder.value.
- Since:
- JDK1.2
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionConstructs a newTypeCodeHolderobject with itsvaluefield initialized tonull.TypeCodeHolder(TypeCode initial) Constructs a newTypeCodeHolderobject with itsvaluefield initialized to the givenTypeCodeobject. -
Method Summary
Modifier and TypeMethodDescriptionvoid_read(InputStream input) Reads frominputand initalizes the value in thisTypeCodeHolderobject with the unmarshalled data._type()Returns the TypeCode corresponding to the value held in thisTypeCodeHolderobject.void_write(OutputStream output) Marshals tooutputthe value in thisTypeCodeHolderobject.
-
Field Details
-
value
TheTypeCodevalue held by thisTypeCodeHolderobject.
-
-
Constructor Details
-
TypeCodeHolder
public TypeCodeHolder()Constructs a newTypeCodeHolderobject with itsvaluefield initialized tonull. -
TypeCodeHolder
Constructs a newTypeCodeHolderobject with itsvaluefield initialized to the givenTypeCodeobject.- Parameters:
initial- theTypeCodeobject with which to initialize thevaluefield of the newly-createdTypeCodeHolderobject
-
-
Method Details
-
_read
Reads frominputand initalizes the value in thisTypeCodeHolderobject with the unmarshalled data.- Specified by:
_readin interfaceStreamable- Parameters:
input- the InputStream containing CDR formatted data from the wire
-
_write
Marshals tooutputthe value in thisTypeCodeHolderobject.- Specified by:
_writein interfaceStreamable- Parameters:
output- the OutputStream which will contain the CDR formatted data
-
_type
Returns the TypeCode corresponding to the value held in thisTypeCodeHolderobject.- Specified by:
_typein interfaceStreamable- Returns:
- the TypeCode of the value held in
this
TypeCodeHolderobject
-