Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Object
org.omg.CORBA.Any
gnu.CORBA.gnuAny
Any
.
For performance reasonse, the inserted values are not cloned.
If the value object allows modifications (like Streamable
),
these subsequent alterations are reflected by the instance of
this gnuAny, and the gnuAny alterations are reflected by the
returned value. If it is required to have the uncoupled value,
it must be requested from the copy of the current instance.
The gnuAny
can be simply cloned by the provided
Clone()
method.
Field Summary | |
protected Streamable |
|
protected static TypeCode | |
protected TypeCode |
|
protected int |
|
Method Summary | |
gnuAny |
|
protected void |
|
InputStream |
|
OutputStream |
|
boolean | |
boolean |
|
Object |
|
Principal |
|
Streamable |
|
TypeCode | |
Serializable |
|
Any | |
boolean | |
char | |
double | |
BigDecimal |
|
float | |
int | |
long | |
byte | |
short | |
String | |
int | |
long | |
short | |
char | |
String | |
int |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void | |
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void | |
void |
|
void |
|
void |
|
void |
|
void | |
ORB |
|
void |
|
void | |
TypeCode |
|
void | |
void |
|
Methods inherited from class java.lang.Object | |
clone , equals , extends Object> getClass , finalize , hashCode , notify , notifyAll , toString , wait , wait , wait |
protected static final TypeCode nullType
The value, returned bytype()
if the value has been not intialized.
public gnuAny Clone()
Creates a deep copy of this gnuAny, writing to and subsequently reading from from the byte buffer.
- Returns:
- the uncoupled gnuAny with all fields set to identical values.
protected void check(int kind) throws BAD_OPERATION
Check if the current value if the value of the given kind.
- Parameters:
kind
- a kind to check.
- Throws:
BAD_OPERATION
- if the value is not set of is different kind.
public InputStream create_input_stream()
Create the buffered CDR input stream, containing the value, stored inside of thisAny
.
- Overrides:
- create_input_stream in interface Any
public OutputStream create_output_stream()
Create the buffered CDR output stream (empty).
- Overrides:
- create_output_stream in interface Any
public boolean equal(Any other)
Compare two Any's for equality.
- Parameters:
other
- the other Any to compare.
public Object extract_Object()
Extract the previously stored object.
- Overrides:
- extract_Object in interface Any
public Principal extract_Principal()
Deprecated. by CORBA 2.2.
Extract the previously inserted CORBAPrincipal
/
- Overrides:
- extract_Principal in interface Any
- Returns:
- the previously inserted value.
- Throws:
BAD_OPERATION
- if the holder contains something else than Principal.
public Streamable extract_Streamable()
Return the value, encapsulated in a suitable holder. This implementation returns the direct reference, so the alterations on the returned streamable are directly reflected to the content of thisAny
.
- Overrides:
- extract_Streamable in interface Any
public TypeCode extract_TypeCode() throws BAD_OPERATION
- Overrides:
- extract_TypeCode in interface Any
public Serializable extract_Value() throws BAD_OPERATION
Extract the stored value type.
- Overrides:
- extract_Value in interface Any
- Returns:
- the previously stored value type.
- Throws:
BAD_OPERATION
- if the Any contains something different.
- See Also:
ValueBase
public boolean extract_boolean() throws BAD_OPERATION
- Overrides:
- extract_boolean in interface Any
public double extract_double() throws BAD_OPERATION
- Overrides:
- extract_double in interface Any
public BigDecimal extract_fixed() throws BAD_OPERATION
Extract the previously inserted CORBAfixed
/
- Overrides:
- extract_fixed in interface Any
- Returns:
- the previously inserted value.
- Throws:
BAD_OPERATION
- if the holder contains something else than BigDecimal.
public float extract_float() throws BAD_OPERATION
- Overrides:
- extract_float in interface Any
public long extract_longlong() throws BAD_OPERATION
- Overrides:
- extract_longlong in interface Any
public byte extract_octet() throws BAD_OPERATION
- Overrides:
- extract_octet in interface Any
public short extract_short() throws BAD_OPERATION
- Overrides:
- extract_short in interface Any
public String extract_string() throws BAD_OPERATION
- Overrides:
- extract_string in interface Any
public int extract_ulong() throws BAD_OPERATION
- Overrides:
- extract_ulong in interface Any
public long extract_ulonglong() throws BAD_OPERATION
- Overrides:
- extract_ulonglong in interface Any
public short extract_ushort() throws BAD_OPERATION
- Overrides:
- extract_ushort in interface Any
public char extract_wchar() throws BAD_OPERATION
- Overrides:
- extract_wchar in interface Any
public String extract_wstring() throws BAD_OPERATION
- Overrides:
- extract_wstring in interface Any
public void insert_Object(Object x)
Inserts the CORBA object.
- Overrides:
- insert_Object in interface Any
public void insert_Object(Object x, TypeCode typecode)
Inserts the CORBA object and sets the typecode to the given type.
- Overrides:
- insert_Object in interface Any
public void insert_Principal(Principal x)
Deprecated. by CORBA 2.2.
Insert the CORBA Principal. This implementation uses direct assignment, so the later alterations of that BigDecimal are reflected on the content of thisAny
.
- Overrides:
- insert_Principal in interface Any
public void insert_Streamable(Streamable x)
Sets the value to the value, encapsulated in this holder. This implementation uses direct assignment, so the later alterations of that streamable are reflected on the content of thisAny
.
- Overrides:
- insert_Streamable in interface Any
public void insert_TypeCode(TypeCode typecode)
Insert the typecode into this Any
- Overrides:
- insert_TypeCode in interface Any
- Parameters:
typecode
- the typecode to insert.
public void insert_Value(Serializable x, TypeCode c_typecode)
- Overrides:
- insert_Value in interface Any
public void insert_any(Any an_any)
Insert anotherAny
into thisAny
. This implementation uses direct assignment, so the later alterations of thatAny
are reflected on the content of thisAny
.
- Overrides:
- insert_any in interface Any
public void insert_fixed(BigDecimal x)
Inserts the CORBAfixed
, setting the typecode by example of the currently passed value. This implementation uses direct assignment, so the later alterations of that BigDecimal are reflected on the content of thisAny
, including the typecode.
- Overrides:
- insert_fixed in interface Any
public void insert_fixed(BigDecimal x, TypeCode x_typecode)
Inserts the CORBAfixed
, setting the typecode explicitly. This implementation uses direct assignment, so the later alterations of that BigDecimal are reflected on the content of thisAny
.
- Overrides:
- insert_fixed in interface Any
public void read_value(InputStream input, TypeCode a_type) throws MARSHAL
Read the value of the given type from the given stream.
- Overrides:
- read_value in interface Any
- Parameters:
input
- a stream to read from.a_type
- a typecode of the value to read.
public void type(TypeCode valueTypeCode)
Explicitly set the typecode of the value to the given type.
- Parameters:
valueTypeCode
- the typecode of the value.