Java Platform 1.2

org.omg.CORBA
Interface DynAny

All Known Subinterfaces:
DynArray, DynEnum, DynFixed, DynSequence, DynStruct, DynUnion, DynValue

public abstract interface DynAny
extends Object

org.omg.CORBA.Any values can be dynamically interpreted (traversed) and constructed through DynAny objects. A DynAny object is associated with a data value which may correspond to a copy of the value inserted into an Any. The DynAny APIs enable traversal of the data value associated with an Any at runtime and extraction of the primitive constituents of the data value.


Method Summary
 void assign(DynAny dyn_any)
          Copy the contents from one Dynamic Any into another.
 DynAny copy()
          Clone this DnyAny.
 DynAny current_component()
          During traversal or iteration of a DynAny, inspect the current component in the DynAny.
 void destroy()
          Destroy this DynAny.
 void from_any(Any value)
          Make a DynAny object from an Any object.
 Any get_any()
           
 boolean get_boolean()
           
 char get_char()
           
 double get_double()
           
 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 value)
           
 void insert_boolean(boolean value)
           
 void insert_char(char value)
           
 void insert_double(double value)
           
 void insert_float(float value)
           
 void insert_long(int value)
           
 void insert_longlong(long value)
           
 void insert_octet(byte value)
           
 void insert_reference(Object value)
           
 void insert_short(short value)
           
 void insert_string(String value)
           
 void insert_typecode(TypeCode value)
           
 void insert_ulong(int value)
           
 void insert_ulonglong(long value)
           
 void insert_ushort(short value)
           
 void insert_val(Serializable value)
           
 void insert_wchar(char value)
           
 void insert_wstring(String value)
           
 boolean next()
          Logically advance the pointer to the next component.
 void rewind()
          Rewind the internal pointer to point to the first component.
 boolean seek(int index)
          Advance to the component at a specified index.
 Any to_any()
          Convert a DynAny object to an Any object.
 TypeCode type()
          Returns the TypeCode of the object inserted into this DynAny.
 
Methods inherited from interface org.omg.CORBA.Object
_create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override
 

Method Detail

type

public TypeCode type()
Returns the TypeCode of the object inserted into this DynAny.
Returns:
the TypeCode object.

assign

public void assign(DynAny dyn_any)
            throws Invalid
Copy the contents from one Dynamic Any into another.
Parameters:
dyn_any - the DynAny object whose contents are assigned to this DynAny.
Throws:
Invalid - if the source DynAny is invalid.

from_any

public void from_any(Any value)
              throws Invalid
Make a DynAny object from an Any object.
Parameters:
value - the Any object.
Throws:
Invalid - if the source Any object is empty or bad.

to_any

public Any to_any()
           throws Invalid
Convert a DynAny object to an Any object.
Returns:
the Any object.
Throws:
Invalid - if this DynAny is empty or bad.

destroy

public void destroy()
Destroy this DynAny.

copy

public DynAny copy()
Clone this DnyAny.
Returns:
the DynAny.

insert_boolean

public void insert_boolean(boolean value)
                    throws InvalidValue

insert_octet

public void insert_octet(byte value)
                  throws InvalidValue

insert_char

public void insert_char(char value)
                 throws InvalidValue

insert_short

public void insert_short(short value)
                  throws InvalidValue

insert_ushort

public void insert_ushort(short value)
                   throws InvalidValue

insert_long

public void insert_long(int value)
                 throws InvalidValue

insert_ulong

public void insert_ulong(int value)
                  throws InvalidValue

insert_float

public void insert_float(float value)
                  throws InvalidValue

insert_double

public void insert_double(double value)
                   throws InvalidValue

insert_string

public void insert_string(String value)
                   throws InvalidValue

insert_reference

public void insert_reference(Object value)
                      throws InvalidValue

insert_typecode

public void insert_typecode(TypeCode value)
                     throws InvalidValue

insert_longlong

public void insert_longlong(long value)
                     throws InvalidValue

insert_ulonglong

public void insert_ulonglong(long value)
                      throws InvalidValue

insert_wchar

public void insert_wchar(char value)
                  throws InvalidValue

insert_wstring

public void insert_wstring(String value)
                    throws InvalidValue

insert_any

public void insert_any(Any value)
                throws InvalidValue

insert_val

public void insert_val(Serializable value)
                throws InvalidValue

get_val

public Serializable get_val()
                     throws TypeMismatch

get_boolean

public boolean get_boolean()
                    throws TypeMismatch

get_octet

public byte get_octet()
               throws TypeMismatch

get_char

public char get_char()
              throws TypeMismatch

get_short

public short get_short()
                throws TypeMismatch

get_ushort

public short get_ushort()
                 throws TypeMismatch

get_long

public int get_long()
             throws TypeMismatch

get_ulong

public int get_ulong()
              throws TypeMismatch

get_float

public float get_float()
                throws TypeMismatch

get_double

public double get_double()
                  throws TypeMismatch

get_string

public String get_string()
                  throws TypeMismatch

get_reference

public Object get_reference()
                     throws TypeMismatch

get_typecode

public TypeCode get_typecode()
                      throws TypeMismatch

get_longlong

public long get_longlong()
                  throws TypeMismatch

get_ulonglong

public long get_ulonglong()
                   throws TypeMismatch

get_wchar

public char get_wchar()
               throws TypeMismatch

get_wstring

public String get_wstring()
                   throws TypeMismatch

get_any

public Any get_any()
            throws TypeMismatch

current_component

public DynAny current_component()
During traversal or iteration of a DynAny, inspect the current component in the DynAny.
Returns:
the DynAny

next

public boolean next()
Logically advance the pointer to the next component.
Returns:
true if there is a next component, false otherwise.

seek

public boolean seek(int index)
Advance to the component at a specified index.
Parameters:
index - the index of the component to advance to.
Returns:
true if there is a component at index, false otherwise.

rewind

public void rewind()
Rewind the internal pointer to point to the first component.

Java Platform 1.2

Submit a bug or feature Version 1.2 of Java Platform API Specification
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.
Copyright 1993-1998 Sun Microsystems, Inc. 901 San Antonio Road,
Palo Alto, California, 94303, U.S.A. All Rights Reserved.