The implementation of
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.
Clone
public gnuAny Clone()
Creates a deep copy of this gnuAny, writing to and subsequently
reading from from the byte buffer.
- the uncoupled gnuAny with all fields set to identical
values.
check
protected void check(int kind)
throws BAD_OPERATION
Check if the current value if the value of the given kind.
equal
public boolean equal(Any other)
Compare two Any's for equality.
- equal in interface Any
other
- the other Any to compare.
extract_Streamable
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 this
Any
.
- extract_Streamable in interface Any
insert_Principal
public void insert_Principal(Principal x)
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 this
Any
.
- insert_Principal in interface Any
insert_Streamable
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 this
Any
.
- insert_Streamable in interface Any
insert_any
public void insert_any(Any an_any)
Insert another
Any
into this
Any
.
This implementation uses direct assignment, so the later
alterations of that
Any
are reflected on the
content of this
Any
.
- insert_any in interface Any
insert_fixed
public void insert_fixed(BigDecimal x)
Inserts the CORBA
fixed
, 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 this
Any
, including the typecode.
- insert_fixed in interface Any
insert_fixed
public void insert_fixed(BigDecimal x,
TypeCode x_typecode)
Inserts the CORBA
fixed
, setting the typecode
explicitly.
This implementation uses direct assignment, so the later
alterations of that BigDecimal are reflected on the
content of this
Any
.
- insert_fixed in interface Any
orb
public ORB orb()
Return the associated orb.
setOrb
public void setOrb(ORB an_orb)
Set the associated orb.
type
public void type(TypeCode valueTypeCode)
Explicitly set the typecode of the value to the given type.
- type in interface Any
valueTypeCode
- the typecode of the value.
gnuAny.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.