A container that can store a value of either user defined or
primitive IDL type.
create_input_stream
public abstract InputStream create_input_stream()
Creates an input stream from that this Any object's value can be
read (unmarshalled).
create_output_stream
public abstract OutputStream create_output_stream()
Creates an output stream into which this Any
object's
value can be written (marshalled).
- the newly created output stream.
equal
public abstract boolean equal(Any other)
Compare this Any
with another Any
.
other
- the other instance to compare with.
- true if both values and value typecodes are equal,
false otherwise.
extract_boolean
public abstract boolean extract_boolean()
throws BAD_OPERATION
Extract the CORBA boolean
from this Any
.
BAD_OPERATION
- if this instance contains value other
than boolean
or the value has not been set.
extract_char
public abstract char extract_char()
throws BAD_OPERATION
Extract the CORBA char
from this Any
.
BAD_OPERATION
- if this instance contains value other
than char
or the value has not been set.
extract_double
public abstract double extract_double()
throws BAD_OPERATION
Extract the CORBA double
from this Any
.
BAD_OPERATION
- if this instance contains value other
than double
or the value has not been set.
extract_float
public abstract float extract_float()
throws BAD_OPERATION
Extract the CORBA float
from this Any
.
BAD_OPERATION
- if this instance contains value other
than float
or the value has not been set.
extract_long
public abstract int extract_long()
throws BAD_OPERATION
Extract the CORBA long
from this Any
.
BAD_OPERATION
- if this instance contains value other
than long
or the value has not been set.
extract_longlong
public abstract long extract_longlong()
throws BAD_OPERATION
Extract the CORBA long long
from this Any
.
BAD_OPERATION
- if this instance contains value other
than longlong
or the value has not been set.
extract_octet
public abstract byte extract_octet()
throws BAD_OPERATION
Extract the CORBA octet
from this Any
.
BAD_OPERATION
- if this instance contains value other
than octet
or the value has not been set.
extract_short
public abstract short extract_short()
throws BAD_OPERATION
Extract the CORBA short
from this Any
.
BAD_OPERATION
- if this instance contains value other
than short
or the value has not been set.
extract_ulong
public abstract int extract_ulong()
throws BAD_OPERATION
Extract the CORBA unsigned long
from this Any
BAD_OPERATION
- if this instance contains value other
than unsigned long
or the value has not been set.
extract_ulonglong
public abstract long extract_ulonglong()
throws BAD_OPERATION
Extract the CORBA unsigned long long
from this
Any
.
BAD_OPERATION
- if this instance contains value other
than unsigned long long
or the value has not been set.
extract_ushort
public abstract short extract_ushort()
throws BAD_OPERATION
Extract the CORBA unsigned short
from this Any
BAD_OPERATION
- if this instance contains value other
than unsigned short
or the value has not been set.
extract_wchar
public abstract char extract_wchar()
throws BAD_OPERATION
Extract the CORBA wchar
from this Any
BAD_OPERATION
- if this instance contains value other
than wchar
or the value has not been set.
insert_Object
public abstract void insert_Object(Object x)
Insert the CORBA Object
into this Any
insert_TypeCode
public abstract void insert_TypeCode(TypeCode typecode)
Insert the CORBA TypeCode
into this Any
value field.
insert_any
public abstract void insert_any(Any x)
Insert the CORBA any
into this Any
insert_boolean
public abstract void insert_boolean(boolean x)
Insert the CORBA boolean
into this Any
insert_char
public abstract void insert_char(char x)
Insert the CORBA char
into this Any
insert_double
public abstract void insert_double(double x)
Insert the CORBA double
into this Any
insert_float
public abstract void insert_float(float x)
Insert the CORBA float
into this Any
insert_long
public abstract void insert_long(int x)
Insert the CORBA long
into this Any
insert_longlong
public abstract void insert_longlong(long x)
Insert the CORBA longlong
into this Any
insert_octet
public abstract void insert_octet(byte x)
Insert the CORBA octet
into this Any
insert_short
public abstract void insert_short(short x)
Insert the CORBA short
into this Any
insert_string
public abstract void insert_string(String x)
Insert the CORBA string
into this Any
insert_ulong
public abstract void insert_ulong(int x)
Insert the CORBA ulong
into this Any
insert_ulonglong
public abstract void insert_ulonglong(long x)
Insert the CORBA ulonglong
into this Any
insert_ushort
public abstract void insert_ushort(short x)
Insert the CORBA ushort
into this Any
insert_wchar
public abstract void insert_wchar(char x)
Insert the CORBA wchar
into this Any
read_value
public abstract void read_value(InputStream input,
TypeCode type)
throws MARSHAL
Read the value into this Any
from the given input stream.
input
- a CORBA stream to read from.type
- a TypeCode of the object being read.
MARSHAL
- if the given TypeCode does not match
the TypeCode of the object, found in the stream.
type
public abstract TypeCode type()
Returns the TypeCode of the object, stored in this Any
type
public abstract void type(TypeCode valueTypeCode)
Set the type of the object, stored in this Any
, to the
given TypeCode. Clear the value.
valueTypeCode
- the type of the object that is expected to be stored
in this any
.
write_value
public abstract void write_value(OutputStream output)
Writes out the value (without the typecode of the value), stored in
this Any
.
output
- the CORBA stream to write into.
Any.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
conditions of the GNU General Public License cover the whole
combination.
As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module. An independent module is a module which is not derived from
or based on this library. If you modify this library, you may extend
this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version.