gnu.CORBA.DynAn

Class gnuDynAny

Implemented Interfaces:
DynAny, DynAnyOperations, IDLEntity, Object, Serializable

public class gnuDynAny
extends AbstractAny
implements DynAny, Serializable

The primitive dynamic Any holds the value basic final_type that cannot be traversed.
See Also:
Serialized Form

Field Summary

protected Streamable
holder
The enclosed Streamable, holding the actual value.

Fields inherited from class gnu.CORBA.DynAn.AbstractAny

factory, final_type, official_type, orb

Constructor Summary

gnuDynAny(Streamable aHolder, TypeCode oType, TypeCode aType, gnuDynAnyFactory aFactory, ORB anOrb)
Create DynAny providing the holder.

Method Summary

void
assign(DynAny from)
Assign the contents of the given DynAny to this DynAny.
int
component_count()
This final_type has no components.
DynAny
copy()
Create a copy of this DynAny via buffer read/write.
DynAny
current_component()
Always returns null.
void
destroy()
Returns without action, leaving all work to the garbage collector.
boolean
equal(DynAny other)
Checks for equality.
void
from_any(Any an_any)
Takes the passed parameter as the enclosed Any reference.
protected int
getHashCodeSimple(int maximum)
Compute hashcode in a trivial way.
Any
get_any()
Return the second (enclosed any) that is stored in the wrapped Any.
boolean
get_boolean()
char
get_char()
double
get_double()
DynAny
get_dyn_any()
Return DynAny, wrapping the second (enclosed any) that is stored in the wrapped Any.
float
get_float()
int
get_long()
long
get_longlong()
byte
get_octet()
Object
get_reference()
short
get_short()
String
get_string()
TypeCode
get_typecode()
int
get_ulong()
long
get_ulonglong()
short
get_ushort()
Serializable
get_val()
char
get_wchar()
String
get_wstring()
void
insert_any(Any a_x)
void
insert_boolean(boolean a_x)
void
insert_char(char a_x)
void
insert_double(double a_x)
void
insert_dyn_any(DynAny d)
Inserts Any, contained in the parameter, into Any, contained in this DynAny.
void
insert_float(float a_x)
void
insert_long(int a_x)
void
insert_longlong(long a_x)
void
insert_octet(byte a_x)
void
insert_reference(Object a_x)
void
insert_short(short a_x)
void
insert_string(String a_x)
void
insert_typecode(TypeCode a_x)
void
insert_ulong(int a_x)
void
insert_ulonglong(long a_x)
void
insert_ushort(short a_x)
void
insert_val(Serializable a_x)
void
insert_wchar(char a_x)
void
insert_wstring(String a_x)
boolean
next()
The objects, enclosed inside this class, have only one component (self).
void
rewind()
Returns without action.
boolean
seek(int p)
This objects, stored in this wrapper, never have multiple internal components to seek.
Any
to_any()
Returns the enclosed Any.
TypeCode
type()

Methods inherited from class gnu.CORBA.DynAn.AbstractAny

createAny, type, valueChanged

Methods inherited from class org.omg.CORBA.LocalObject

_create_request, _create_request, _duplicate, _get_domain_managers, _get_interface, _get_interface_def, _get_policy, _hash, _invoke, _is_a, _is_equivalent, _is_local, _non_existent, _orb, _release, _releaseReply, _request, _request, _servant_postinvoke, _set_policy_override, validate_connection

Methods inherited from class java.lang.Object

clone, equals, extends Object> getClass, finalize, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Details

holder

protected Streamable holder
The enclosed Streamable, holding the actual value.

Constructor Details

gnuDynAny

public gnuDynAny(Streamable aHolder,
                 TypeCode oType,
                 TypeCode aType,
                 gnuDynAnyFactory aFactory,
                 ORB anOrb)
Create DynAny providing the holder.
Parameters:

Method Details

assign

public void assign(DynAny from)
            throws TypeMismatch
Assign the contents of the given DynAny to this DynAny.
Specified by:
assign in interface DynAnyOperations
Parameters:
from - the source to assign from.

component_count

public int component_count()
This final_type has no components.
Specified by:
component_count in interface DynAnyOperations
Returns:
0, always.

copy

public DynAny copy()
Create a copy of this DynAny via buffer read/write.
Specified by:
copy in interface DynAnyOperations

current_component

public DynAny current_component()
            throws TypeMismatch
Always returns null.
Specified by:
current_component in interface DynAnyOperations
Returns:
null, always.

destroy

public void destroy()
Returns without action, leaving all work to the garbage collector.
Specified by:
destroy in interface DynAnyOperations

equal

public boolean equal(DynAny other)
Checks for equality. The DynAnys are equal if the stored Anys are equal.
Specified by:
equal in interface DynAnyOperations

from_any

public void from_any(Any an_any)
            throws TypeMismatch,
                   InvalidValue
Takes the passed parameter as the enclosed Any reference.
Specified by:
from_any in interface DynAnyOperations
Parameters:
an_any - the Any that will be used as an enclosed reference.
Throws:
TypeMismatch - if the final_type of the passed Any is not the same as the final_type, currently stored in this Any.

getHashCodeSimple

protected int getHashCodeSimple(int maximum)
Compute hashcode in a trivial way.

get_any

public Any get_any()
            throws TypeMismatch
Return the second (enclosed any) that is stored in the wrapped Any.
Specified by:
get_any in interface DynAnyOperations

get_boolean

public boolean get_boolean()
            throws TypeMismatch
Specified by:
get_boolean in interface DynAnyOperations

get_char

public char get_char()
            throws TypeMismatch
Specified by:
get_char in interface DynAnyOperations

get_double

public double get_double()
            throws TypeMismatch
Specified by:
get_double in interface DynAnyOperations

get_dyn_any

public DynAny get_dyn_any()
            throws TypeMismatch,
                   InvalidValue
Return DynAny, wrapping the second (enclosed any) that is stored in the wrapped Any.
Specified by:
get_dyn_any in interface DynAnyOperations
Throws:
TypeMismatch - if the wrapped Any does not store another Any.
InvalidValue - if the current position points nowhere.

get_float

public float get_float()
            throws TypeMismatch
Specified by:
get_float in interface DynAnyOperations

get_long

public int get_long()
            throws TypeMismatch
Specified by:
get_long in interface DynAnyOperations

get_longlong

public long get_longlong()
            throws TypeMismatch
Specified by:
get_longlong in interface DynAnyOperations

get_octet

public byte get_octet()
            throws TypeMismatch
Specified by:
get_octet in interface DynAnyOperations

get_reference

public Object get_reference()
            throws TypeMismatch
Specified by:
get_reference in interface DynAnyOperations

get_short

public short get_short()
            throws TypeMismatch
Specified by:
get_short in interface DynAnyOperations

get_string

public String get_string()
            throws TypeMismatch
Specified by:
get_string in interface DynAnyOperations

get_typecode

public TypeCode get_typecode()
            throws TypeMismatch
Specified by:
get_typecode in interface DynAnyOperations

get_ulong

public int get_ulong()
            throws TypeMismatch
Specified by:
get_ulong in interface DynAnyOperations

get_ulonglong

public long get_ulonglong()
            throws TypeMismatch
Specified by:
get_ulonglong in interface DynAnyOperations

get_ushort

public short get_ushort()
            throws TypeMismatch
Specified by:
get_ushort in interface DynAnyOperations

get_val

public Serializable get_val()
            throws TypeMismatch
Specified by:
get_val in interface DynAnyOperations

get_wchar

public char get_wchar()
            throws TypeMismatch
Specified by:
get_wchar in interface DynAnyOperations

get_wstring

public String get_wstring()
            throws TypeMismatch
Specified by:
get_wstring in interface DynAnyOperations

insert_any

public void insert_any(Any a_x)
            throws TypeMismatch,
                   InvalidValue
Specified by:
insert_any in interface DynAnyOperations

insert_boolean

public void insert_boolean(boolean a_x)
            throws InvalidValue,
                   TypeMismatch
Specified by:
insert_boolean in interface DynAnyOperations

insert_char

public void insert_char(char a_x)
            throws InvalidValue,
                   TypeMismatch
Specified by:
insert_char in interface DynAnyOperations

insert_double

public void insert_double(double a_x)
            throws InvalidValue,
                   TypeMismatch
Specified by:
insert_double in interface DynAnyOperations

insert_dyn_any

public void insert_dyn_any(DynAny d)
            throws TypeMismatch,
                   InvalidValue
Inserts Any, contained in the parameter, into Any, contained in this DynAny.
Specified by:
insert_dyn_any in interface DynAnyOperations

insert_float

public void insert_float(float a_x)
            throws InvalidValue,
                   TypeMismatch
Specified by:
insert_float in interface DynAnyOperations

insert_long

public void insert_long(int a_x)
            throws InvalidValue,
                   TypeMismatch
Specified by:
insert_long in interface DynAnyOperations

insert_longlong

public void insert_longlong(long a_x)
            throws InvalidValue,
                   TypeMismatch
Specified by:
insert_longlong in interface DynAnyOperations

insert_octet

public void insert_octet(byte a_x)
            throws InvalidValue,
                   TypeMismatch
Specified by:
insert_octet in interface DynAnyOperations

insert_reference

public void insert_reference(Object a_x)
            throws InvalidValue,
                   TypeMismatch
Specified by:
insert_reference in interface DynAnyOperations

insert_short

public void insert_short(short a_x)
            throws InvalidValue,
                   TypeMismatch
Specified by:
insert_short in interface DynAnyOperations

insert_string

public void insert_string(String a_x)
            throws InvalidValue,
                   TypeMismatch
Specified by:
insert_string in interface DynAnyOperations

insert_typecode

public void insert_typecode(TypeCode a_x)
            throws InvalidValue,
                   TypeMismatch
Specified by:
insert_typecode in interface DynAnyOperations

insert_ulong

public void insert_ulong(int a_x)
            throws InvalidValue,
                   TypeMismatch
Specified by:
insert_ulong in interface DynAnyOperations

insert_ulonglong

public void insert_ulonglong(long a_x)
            throws InvalidValue,
                   TypeMismatch
Specified by:
insert_ulonglong in interface DynAnyOperations

insert_ushort

public void insert_ushort(short a_x)
            throws InvalidValue,
                   TypeMismatch
Specified by:
insert_ushort in interface DynAnyOperations

insert_val

public void insert_val(Serializable a_x)
            throws InvalidValue,
                   TypeMismatch
Specified by:
insert_val in interface DynAnyOperations

insert_wchar

public void insert_wchar(char a_x)
            throws InvalidValue,
                   TypeMismatch
Specified by:
insert_wchar in interface DynAnyOperations

insert_wstring

public void insert_wstring(String a_x)
            throws InvalidValue,
                   TypeMismatch
Specified by:
insert_wstring in interface DynAnyOperations

next

public boolean next()
The objects, enclosed inside this class, have only one component (self).
Specified by:
next in interface DynAnyOperations
Returns:
false, always (no other action).

rewind

public void rewind()
Returns without action.
Specified by:
rewind in interface DynAnyOperations

seek

public boolean seek(int p)
This objects, stored in this wrapper, never have multiple internal components to seek.
Specified by:
seek in interface DynAnyOperations
Returns:
false, always (no other action).

to_any

public Any to_any()
Returns the enclosed Any.
Specified by:
to_any in interface DynAnyOperations
Returns:
the enclosed Any.

type

public TypeCode type()
Specified by:
type in interface DynAnyOperations
Overrides:
type in interface AbstractAny

gnuDynAny.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.