gnu.CORBA.DynAn

Class DivideableAny

Implemented Interfaces:
Object, Serializable
Known Direct Subclasses:
gnuDynArray, gnuDynUnion, gnuDynValueBox, RecordAny

public abstract class DivideableAny
extends AbstractAny
implements Serializable

Provides a base for DynAnys, having multiple components.
See Also:
Serialized Form

Field Summary

protected DynAny[]
array
The array of the components that in general case may have different final_type.
protected int
pos
The internal pointer.

Fields inherited from class gnu.CORBA.DynAn.AbstractAny

factory, final_type, official_type, orb

Constructor Summary

DivideableAny(TypeCode oType, TypeCode aType, gnuDynAnyFactory aFactory, ORB anOrb)

Method Summary

int
component_count()
DynAny
current_component()
Get current component.
void
destroy()
No action, cleanup is done by garbage collector in java.
boolean
equal(DynAny other)
Compares with other DynAny for equality.
protected DynAny
focused()
Get the insertion point as DynAny.
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()
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 insert_it)
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()
Advance forward.
void
rewind()
Set zero position.
boolean
seek(int p)
Set a position.
abstract Any
to_any()
Involved in equal(DynAny).

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

array

protected DynAny[] array
The array of the components that in general case may have different final_type.

pos

protected int pos
The internal pointer.

Constructor Details

DivideableAny

public DivideableAny(TypeCode oType,
                     TypeCode aType,
                     gnuDynAnyFactory aFactory,
                     ORB anOrb)

Method Details

component_count

public int component_count()

current_component

public DynAny current_component()
            throws TypeMismatch
Get current component.
Returns:
current component or null if the pointer is out of bounds.

destroy

public void destroy()
No action, cleanup is done by garbage collector in java.

equal

public boolean equal(DynAny other)
Compares with other DynAny for equality. The final_type, array size and array members must match.

focused

protected DynAny focused()
            throws InvalidValue,
                   TypeMismatch
Get the insertion point as DynAny. This method may throw exceptions if the current insertion point does not support reading or insertion of the primitive types.
Returns:
the focused component, from where the primitve value can be read or where it can be inserted.
Throws:
InvalidValue - if the primitive value cannot be inserted at the given point.

get_any

public Any get_any()
            throws TypeMismatch,
                   InvalidValue
Return the second (enclosed any) that is stored in the wrapped Any.

get_boolean

public boolean get_boolean()
            throws TypeMismatch,
                   InvalidValue

get_char

public char get_char()
            throws TypeMismatch,
                   InvalidValue

get_double

public double get_double()
            throws TypeMismatch,
                   InvalidValue

get_dyn_any

public DynAny get_dyn_any()
            throws TypeMismatch,
                   InvalidValue

get_float

public float get_float()
            throws TypeMismatch,
                   InvalidValue

get_long

public int get_long()
            throws TypeMismatch,
                   InvalidValue

get_longlong

public long get_longlong()
            throws TypeMismatch,
                   InvalidValue

get_octet

public byte get_octet()
            throws TypeMismatch,
                   InvalidValue

get_reference

public Object get_reference()
            throws TypeMismatch,
                   InvalidValue

get_short

public short get_short()
            throws TypeMismatch,
                   InvalidValue

get_string

public String get_string()
            throws TypeMismatch,
                   InvalidValue

get_typecode

public TypeCode get_typecode()
            throws TypeMismatch,
                   InvalidValue

get_ulong

public int get_ulong()
            throws TypeMismatch,
                   InvalidValue

get_ulonglong

public long get_ulonglong()
            throws TypeMismatch,
                   InvalidValue

get_ushort

public short get_ushort()
            throws TypeMismatch,
                   InvalidValue

get_val

public Serializable get_val()
            throws TypeMismatch,
                   InvalidValue

get_wchar

public char get_wchar()
            throws TypeMismatch,
                   InvalidValue

get_wstring

public String get_wstring()
            throws TypeMismatch,
                   InvalidValue

insert_any

public void insert_any(Any a_x)
            throws TypeMismatch,
                   InvalidValue

insert_boolean

public void insert_boolean(boolean a_x)
            throws InvalidValue,
                   TypeMismatch

insert_char

public void insert_char(char a_x)
            throws InvalidValue,
                   TypeMismatch

insert_double

public void insert_double(double a_x)
            throws InvalidValue,
                   TypeMismatch

insert_dyn_any

public void insert_dyn_any(DynAny insert_it)
            throws TypeMismatch,
                   InvalidValue

insert_float

public void insert_float(float a_x)
            throws InvalidValue,
                   TypeMismatch

insert_long

public void insert_long(int a_x)
            throws InvalidValue,
                   TypeMismatch

insert_longlong

public void insert_longlong(long a_x)
            throws InvalidValue,
                   TypeMismatch

insert_octet

public void insert_octet(byte a_x)
            throws InvalidValue,
                   TypeMismatch

insert_reference

public void insert_reference(Object a_x)
            throws InvalidValue,
                   TypeMismatch

insert_short

public void insert_short(short a_x)
            throws InvalidValue,
                   TypeMismatch

insert_string

public void insert_string(String a_x)
            throws InvalidValue,
                   TypeMismatch

insert_typecode

public void insert_typecode(TypeCode a_x)
            throws InvalidValue,
                   TypeMismatch

insert_ulong

public void insert_ulong(int a_x)
            throws InvalidValue,
                   TypeMismatch

insert_ulonglong

public void insert_ulonglong(long a_x)
            throws InvalidValue,
                   TypeMismatch

insert_ushort

public void insert_ushort(short a_x)
            throws InvalidValue,
                   TypeMismatch

insert_val

public void insert_val(Serializable a_x)
            throws InvalidValue,
                   TypeMismatch

insert_wchar

public void insert_wchar(char a_x)
            throws InvalidValue,
                   TypeMismatch

insert_wstring

public void insert_wstring(String a_x)
            throws InvalidValue,
                   TypeMismatch

next

public boolean next()
Advance forward.

rewind

public void rewind()
Set zero position.

seek

public boolean seek(int p)
Set a position.

to_any

public abstract Any to_any()
            throws TypeMismatch
Involved in equal(DynAny).

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