KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > omg > DynamicAny > DynAnyOperations


1 package org.omg.DynamicAny;
2
3
4 /**
5 * org/omg/DynamicAny/DynAnyOperations.java .
6 * Generated by the IDL-to-Java compiler (portable), version "3.2"
7 * from ../../../../src/share/classes/org/omg/DynamicAny/DynamicAny.idl
8 * Saturday, February 9, 2008 9:40:11 AM GMT
9 */

10
11
12 /**
13     * Any values can be dynamically interpreted (traversed) and constructed through DynAny objects.
14     * A DynAny object is associated with a data value which corresponds to a copy of the value
15     * inserted into an any.
16     * <P>A DynAny object may be viewed as an ordered collection of component DynAnys.
17     * For DynAnys representing a basic type, such as long, or a type without components,
18     * such as an empty exception, the ordered collection of components is empty.
19     * Each DynAny object maintains the notion of a current position into its collection
20     * of component DynAnys. The current position is identified by an index value that runs
21     * from 0 to n-1, where n is the number of components.
22     * The special index value -1 indicates a current position that points nowhere.
23     * For values that cannot have a current position (such as an empty exception),
24     * the index value is fixed at -1.
25     * If a DynAny is initialized with a value that has components, the index is initialized to 0.
26     * After creation of an uninitialized DynAny (that is, a DynAny that has no value but a TypeCode
27     * that permits components), the current position depends on the type of value represented by
28     * the DynAny. (The current position is set to 0 or -1, depending on whether the new DynAny
29     * gets default values for its components.)
30     * <P>The iteration operations rewind, seek, and next can be used to change the current position
31     * and the current_component operation returns the component at the current position.
32     * The component_count operation returns the number of components of a DynAny.
33     * Collectively, these operations enable iteration over the components of a DynAny, for example,
34     * to (recursively) examine its contents.
35     * <P>A constructed DynAny object is a DynAny object associated with a constructed type.
36     * There is a different interface, inheriting from the DynAny interface, associated with
37     * each kind of constructed type in IDL (fixed, enum, struct, sequence, union, array,
38     * exception, and value type).
39     * <P>A constructed DynAny object exports operations that enable the creation of new DynAny objects,
40     * each of them associated with a component of the constructed data value.
41     * As an example, a DynStruct is associated with a struct value. This means that the DynStruct
42     * may be seen as owning an ordered collection of components, one for each structure member.
43     * The DynStruct object exports operations that enable the creation of new DynAny objects,
44     * each of them associated with a member of the struct.
45     * <P>If a DynAny object has been obtained from another (constructed) DynAny object,
46     * such as a DynAny representing a structure member that was created from a DynStruct,
47     * the member DynAny is logically contained in the DynStruct.
48     * Calling an insert or get operation leaves the current position unchanged.
49     * Destroying a top-level DynAny object (one that was not obtained as a component of another DynAny)
50     * also destroys any component DynAny objects obtained from it.
51     * Destroying a non-top level DynAny object does nothing.
52     * Invoking operations on a destroyed top-level DynAny or any of its descendants raises OBJECT_NOT_EXIST.
53     * If the programmer wants to destroy a DynAny object but still wants to manipulate some component
54     * of the data value associated with it, then he or she should first create a DynAny for the component
55     * and, after that, make a copy of the created DynAny object.
56     * <P>The behavior of DynAny objects has been defined in order to enable efficient implementations
57     * in terms of allocated memory space and speed of access. DynAny objects are intended to be used
58     * for traversing values extracted from anys or constructing values of anys at runtime.
59     * Their use for other purposes is not recommended.
60     * <P>Insert and get operations are necessary to handle basic DynAny objects
61     * but are also helpful to handle constructed DynAny objects.
62     * Inserting a basic data type value into a constructed DynAny object
63     * implies initializing the current component of the constructed data value
64     * associated with the DynAny object. For example, invoking insert_boolean on a
65     * DynStruct implies inserting a boolean data value at the current position
66     * of the associated struct data value.
67     * A type is consistent for inserting or extracting a value if its TypeCode is equivalent to
68     * the TypeCode contained in the DynAny or, if the DynAny has components, is equivalent to the TypeCode
69     * of the DynAny at the current position.
70     * <P>DynAny and DynAnyFactory objects are intended to be local to the process in which they are
71     * created and used. This means that references to DynAny and DynAnyFactory objects cannot be exported
72     * to other processes, or externalized with ORB.object_to_string().
73     * If any attempt is made to do so, the offending operation will raise a MARSHAL system exception.
74     * Since their interfaces are specified in IDL, DynAny objects export operations defined in the standard
75     * org.omg.CORBA.Object interface. However, any attempt to invoke operations exported through the Object
76     * interface may raise the standard NO_IMPLEMENT exception.
77     * An attempt to use a DynAny object with the DII may raise the NO_IMPLEMENT exception.
78     */

79 public interface DynAnyOperations
80 {
81
82   /**
83         * Returns the TypeCode associated with this DynAny object.
84         * A DynAny object is created with a TypeCode value assigned to it.
85         * This TypeCode value determines the type of the value handled through the DynAny object.
86         * Note that the TypeCode associated with a DynAny object is initialized at the time the
87         * DynAny is created and cannot be changed during lifetime of the DynAny object.
88         *
89         * @return The TypeCode associated with this DynAny object
90         */

91   org.omg.CORBA.TypeCode JavaDoc type ();
92
93   /**
94         * Initializes the value associated with a DynAny object with the value
95         * associated with another DynAny object.
96         * The current position of the target DynAny is set to zero for values that have components
97         * and to -1 for values that do not have components.
98         *
99         * @param dyn_any
100         * @exception TypeMismatch if the type of the passed DynAny is not equivalent to the type of target DynAny
101         */

102   void assign (org.omg.DynamicAny.DynAny JavaDoc dyn_any) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc;
103
104   /**
105         * Initializes the value associated with a DynAny object with the value contained in an any.
106         * The current position of the target DynAny is set to zero for values that have components
107         * and to -1 for values that do not have components.
108         *
109         * @exception TypeMismatch if the type of the passed Any is not equivalent to the type of target DynAny
110         * @exception InvalidValue if the passed Any does not contain a legal value (such as a null string)
111         */

112   void from_any (org.omg.CORBA.Any JavaDoc value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc;
113
114   /**
115         * Creates an any value from a DynAny object.
116         * A copy of the TypeCode associated with the DynAny object is assigned to the resulting any.
117         * The value associated with the DynAny object is copied into the any.
118         *
119         * @return a new Any object with the same value and TypeCode
120         */

121   org.omg.CORBA.Any JavaDoc to_any ();
122
123   /**
124         * Compares two DynAny values for equality.
125         * Two DynAny values are equal if their TypeCodes are equivalent and, recursively, all component DynAnys
126         * have equal values.
127         * The current position of the two DynAnys being compared has no effect on the result of equal.
128         *
129         * @return true of the DynAnys are equal, false otherwise
130         */

131   boolean equal (org.omg.DynamicAny.DynAny JavaDoc dyn_any);
132
133   /**
134         * Destroys a DynAny object.
135         * This operation frees any resources used to represent the data value associated with a DynAny object.
136         * It must be invoked on references obtained from one of the creation operations on the ORB interface
137         * or on a reference returned by DynAny.copy() to avoid resource leaks.
138         * Invoking destroy on component DynAny objects (for example, on objects returned by the
139         * current_component operation) does nothing.
140         * Destruction of a DynAny object implies destruction of all DynAny objects obtained from it.
141         * That is, references to components of a destroyed DynAny become invalid.
142         * Invocations on such references raise OBJECT_NOT_EXIST.
143         * It is possible to manipulate a component of a DynAny beyond the life time of the DynAny
144         * from which the component was obtained by making a copy of the component with the copy operation
145         * before destroying the DynAny from which the component was obtained.
146         */

147   void destroy ();
148
149   /**
150         * Creates a new DynAny object whose value is a deep copy of the DynAny on which it is invoked.
151         * The operation is polymorphic, that is, invoking it on one of the types derived from DynAny,
152         * such as DynStruct, creates the derived type but returns its reference as the DynAny base type.
153         *
154         * @return a deep copy of the DynAny object
155         */

156   org.omg.DynamicAny.DynAny JavaDoc copy ();
157
158   /**
159         * Inserts a boolean value into the DynAny.
160         *
161         * @exception InvalidValue if this DynAny has components but has a current position of -1
162         * @exception TypeMismatch if called on a DynAny whose current component itself has components
163         */

164   void insert_boolean (boolean value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc;
165
166   /**
167         * Inserts a byte value into the DynAny. The IDL octet data type is mapped to the Java byte data type.
168         *
169         * @exception InvalidValue if this DynAny has components but has a current position of -1
170         * @exception TypeMismatch if called on a DynAny whose current component itself has components
171         */

172   void insert_octet (byte value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc;
173
174   /**
175         * Inserts a char value into the DynAny.
176         *
177         * @exception InvalidValue if this DynAny has components but has a current position of -1
178         * @exception TypeMismatch if called on a DynAny whose current component itself has components
179         */

180   void insert_char (char value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc;
181
182   /**
183         * Inserts a short value into the DynAny.
184         *
185         * @exception InvalidValue if this DynAny has components but has a current position of -1
186         * @exception TypeMismatch if called on a DynAny whose current component itself has components
187         */

188   void insert_short (short value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc;
189
190   /**
191         * Inserts a short value into the DynAny. The IDL ushort data type is mapped to the Java short data type.
192         *
193         * @exception InvalidValue if this DynAny has components but has a current position of -1
194         * @exception TypeMismatch if called on a DynAny whose current component itself has components
195         */

196   void insert_ushort (short value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc;
197
198   /**
199         * Inserts an integer value into the DynAny. The IDL long data type is mapped to the Java int data type.
200         *
201         * @exception InvalidValue if this DynAny has components but has a current position of -1
202         * @exception TypeMismatch if called on a DynAny whose current component itself has components
203         */

204   void insert_long (int value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc;
205
206   /**
207         * Inserts an integer value into the DynAny. The IDL ulong data type is mapped to the Java int data type.
208         *
209         * @exception InvalidValue if this DynAny has components but has a current position of -1
210         * @exception TypeMismatch if called on a DynAny whose current component itself has components
211         */

212   void insert_ulong (int value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc;
213
214   /**
215         * Inserts a float value into the DynAny.
216         *
217         * @exception InvalidValue if this DynAny has components but has a current position of -1
218         * @exception TypeMismatch if called on a DynAny whose current component itself has components
219         */

220   void insert_float (float value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc;
221
222   /**
223         * Inserts a double value into the DynAny.
224         *
225         * @exception InvalidValue if this DynAny has components but has a current position of -1
226         * @exception TypeMismatch if called on a DynAny whose current component itself has components
227         */

228   void insert_double (double value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc;
229
230   /**
231         * Inserts a string value into the DynAny.
232         * Both bounded and unbounded strings are inserted using this method.
233         *
234         * @exception InvalidValue if this DynAny has components but has a current position of -1
235         * @exception InvalidValue if the string inserted is longer than the bound of a bounded string
236         * @exception TypeMismatch if called on a DynAny whose current component itself has components
237         */

238   void insert_string (String JavaDoc value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc;
239
240   /**
241         * Inserts a reference to a CORBA object into the DynAny.
242         *
243         * @exception InvalidValue if this DynAny has components but has a current position of -1
244         * @exception TypeMismatch if called on a DynAny whose current component itself has components
245         */

246   void insert_reference (org.omg.CORBA.Object JavaDoc value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc;
247
248   /**
249         * Inserts a TypeCode object into the DynAny.
250         *
251         * @exception InvalidValue if this DynAny has components but has a current position of -1
252         * @exception TypeMismatch if called on a DynAny whose current component itself has components
253         */

254   void insert_typecode (org.omg.CORBA.TypeCode JavaDoc value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc;
255
256   /**
257         * Inserts a long value into the DynAny. The IDL long long data type is mapped to the Java long data type.
258         *
259         * @exception InvalidValue if this DynAny has components but has a current position of -1
260         * @exception TypeMismatch if called on a DynAny whose current component itself has components
261         */

262   void insert_longlong (long value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc;
263
264   /**
265         * Inserts a long value into the DynAny.
266         * The IDL unsigned long long data type is mapped to the Java long data type.
267         *
268         * @exception InvalidValue if this DynAny has components but has a current position of -1
269         * @exception TypeMismatch if called on a DynAny whose current component itself has components
270         */

271   void insert_ulonglong (long value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc;
272
273   /**
274         * Inserts a char value into the DynAny. The IDL wchar data type is mapped to the Java char data type.
275         *
276         * @exception InvalidValue if this DynAny has components but has a current position of -1
277         * @exception TypeMismatch if called on a DynAny whose current component itself has components
278         */

279   void insert_wchar (char value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc;
280
281   /**
282         * Inserts a string value into the DynAny.
283         * Both bounded and unbounded strings are inserted using this method.
284         *
285         * @exception InvalidValue if this DynAny has components but has a current position of -1
286         * @exception InvalidValue if the string inserted is longer than the bound of a bounded string
287         */

288   void insert_wstring (String JavaDoc value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc;
289
290   /**
291         * Inserts an Any value into the Any represented by this DynAny.
292         *
293         * @exception InvalidValue if this DynAny has components but has a current position of -1
294         * @exception TypeMismatch if called on a DynAny whose current component itself has components
295         */

296   void insert_any (org.omg.CORBA.Any JavaDoc value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc;
297
298   /**
299         * Inserts the Any value contained in the parameter DynAny into the Any represented by this DynAny.
300         *
301         * @exception InvalidValue if this DynAny has components but has a current position of -1
302         * @exception TypeMismatch if called on a DynAny whose current component itself has components
303         */

304   void insert_dyn_any (org.omg.DynamicAny.DynAny JavaDoc value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc;
305
306   /**
307         * Inserts a reference to a Serializable object into this DynAny.
308         * The IDL ValueBase type is mapped to the Java Serializable type.
309         *
310         * @exception InvalidValue if this DynAny has components but has a current position of -1
311         * @exception TypeMismatch if called on a DynAny whose current component itself has components
312         */

313   void insert_val (java.io.Serializable JavaDoc value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc;
314
315   /**
316         * Extracts the boolean value from this DynAny.
317         *
318         * @exception TypeMismatch if the accessed component in the DynAny is of a type
319         * that is not equivalent to the requested type.
320         * @exception TypeMismatch if called on a DynAny whose current component itself has components
321         * @exception InvalidValue if this DynAny has components but has a current position of -1
322         */

323   boolean get_boolean () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc;
324
325   /**
326         * Extracts the byte value from this DynAny. The IDL octet data type is mapped to the Java byte data type.
327         *
328         * @exception TypeMismatch if the accessed component in the DynAny is of a type
329         * that is not equivalent to the requested type.
330         * @exception TypeMismatch if called on a DynAny whose current component itself has components
331         * @exception InvalidValue if this DynAny has components but has a current position of -1
332         */

333   byte get_octet () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc;
334
335   /**
336         * Extracts the char value from this DynAny.
337         *
338         * @exception TypeMismatch if the accessed component in the DynAny is of a type
339         * that is not equivalent to the requested type.
340         * @exception TypeMismatch if called on a DynAny whose current component itself has components
341         * @exception InvalidValue if this DynAny has components but has a current position of -1
342         */

343   char get_char () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc;
344
345   /**
346         * Extracts the short value from this DynAny.
347         *
348         * @exception TypeMismatch if the accessed component in the DynAny is of a type
349         * that is not equivalent to the requested type.
350         * @exception TypeMismatch if called on a DynAny whose current component itself has components
351         * @exception InvalidValue if this DynAny has components but has a current position of -1
352         */

353   short get_short () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc;
354
355   /**
356         * Extracts the short value from this DynAny. The IDL ushort data type is mapped to the Java short data type.
357         *
358         * @exception TypeMismatch if the accessed component in the DynAny is of a type
359         * that is not equivalent to the requested type.
360         * @exception TypeMismatch if called on a DynAny whose current component itself has components
361         * @exception InvalidValue if this DynAny has components but has a current position of -1
362         */

363   short get_ushort () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc;
364
365   /**
366         * Extracts the integer value from this DynAny. The IDL long data type is mapped to the Java int data type.
367         *
368         * @exception TypeMismatch if the accessed component in the DynAny is of a type
369         * that is not equivalent to the requested type.
370         * @exception TypeMismatch if called on a DynAny whose current component itself has components
371         * @exception InvalidValue if this DynAny has components but has a current position of -1
372         */

373   int get_long () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc;
374
375   /**
376         * Extracts the integer value from this DynAny. The IDL ulong data type is mapped to the Java int data type.
377         *
378         * @exception TypeMismatch if the accessed component in the DynAny is of a type
379         * that is not equivalent to the requested type.
380         * @exception TypeMismatch if called on a DynAny whose current component itself has components
381         * @exception InvalidValue if this DynAny has components but has a current position of -1
382         */

383   int get_ulong () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc;
384
385   /**
386         * Extracts the float value from this DynAny.
387         *
388         * @exception TypeMismatch if the accessed component in the DynAny is of a type
389         * that is not equivalent to the requested type.
390         * @exception TypeMismatch if called on a DynAny whose current component itself has components
391         * @exception InvalidValue if this DynAny has components but has a current position of -1
392         */

393   float get_float () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc;
394
395   /**
396         * Extracts the double value from this DynAny.
397         *
398         * @exception TypeMismatch if the accessed component in the DynAny is of a type
399         * that is not equivalent to the requested type.
400         * @exception TypeMismatch if called on a DynAny whose current component itself has components
401         * @exception InvalidValue if this DynAny has components but has a current position of -1
402         */

403   double get_double () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc;
404
405   /**
406         * Extracts the string value from this DynAny.
407         * Both bounded and unbounded strings are extracted using this method.
408         *
409         * @exception TypeMismatch if the accessed component in the DynAny is of a type
410         * that is not equivalent to the requested type.
411         * @exception TypeMismatch if called on a DynAny whose current component itself has components
412         * @exception InvalidValue if this DynAny has components but has a current position of -1
413         */

414   String JavaDoc get_string () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc;
415
416   /**
417         * Extracts the reference to a CORBA Object from this DynAny.
418         *
419         * @exception TypeMismatch if the accessed component in the DynAny is of a type
420         * that is not equivalent to the requested type.
421         * @exception TypeMismatch if called on a DynAny whose current component itself has components
422         * @exception InvalidValue if this DynAny has components but has a current position of -1
423         */

424   org.omg.CORBA.Object JavaDoc get_reference () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc;
425
426   /**
427         * Extracts the TypeCode object from this DynAny.
428         *
429         * @exception TypeMismatch if the accessed component in the DynAny is of a type
430         * that is not equivalent to the requested type.
431         * @exception TypeMismatch if called on a DynAny whose current component itself has components
432         * @exception InvalidValue if this DynAny has components but has a current position of -1
433         */

434   org.omg.CORBA.TypeCode JavaDoc get_typecode () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc;
435
436   /**
437         * Extracts the long value from this DynAny. The IDL long long data type is mapped to the Java long data type.
438         *
439         * @exception TypeMismatch if the accessed component in the DynAny is of a type
440         * that is not equivalent to the requested type.
441         * @exception TypeMismatch if called on a DynAny whose current component itself has components
442         * @exception InvalidValue if this DynAny has components but has a current position of -1
443         */

444   long get_longlong () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc;
445
446   /**
447         * Extracts the long value from this DynAny.
448         * The IDL unsigned long long data type is mapped to the Java long data type.
449         *
450         * @exception TypeMismatch if the accessed component in the DynAny is of a type
451         * that is not equivalent to the requested type.
452         * @exception TypeMismatch if called on a DynAny whose current component itself has components
453         * @exception InvalidValue if this DynAny has components but has a current position of -1
454         */

455   long get_ulonglong () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc;
456
457   /**
458         * Extracts the long value from this DynAny. The IDL wchar data type is mapped to the Java char data type.
459         *
460         * @exception TypeMismatch if the accessed component in the DynAny is of a type
461         * that is not equivalent to the requested type.
462         * @exception TypeMismatch if called on a DynAny whose current component itself has components
463         * @exception InvalidValue if this DynAny has components but has a current position of -1
464         */

465   char get_wchar () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc;
466
467   /**
468         * Extracts the string value from this DynAny.
469         * Both bounded and unbounded strings are extracted using this method.
470         *
471         * @exception TypeMismatch if the accessed component in the DynAny is of a type
472         * that is not equivalent to the requested type.
473         * @exception TypeMismatch if called on a DynAny whose current component itself has components
474         */

475   String JavaDoc get_wstring () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc;
476
477   /**
478         * Extracts an Any value contained in the Any represented by this DynAny.
479         *
480         * @exception TypeMismatch if the accessed component in the DynAny is of a type
481         * that is not equivalent to the requested type.
482         * @exception TypeMismatch if called on a DynAny whose current component itself has components
483         * @exception InvalidValue if this DynAny has components but has a current position of -1
484         */

485   org.omg.CORBA.Any JavaDoc get_any () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc;
486
487   /**
488         * Extracts the Any value contained in the Any represented by this DynAny and returns it wrapped
489         * into a new DynAny.
490         *
491         * @exception TypeMismatch if the accessed component in the DynAny is of a type
492         * that is not equivalent to the requested type.
493         * @exception TypeMismatch if called on a DynAny whose current component itself has components
494         * @exception InvalidValue if this DynAny has components but has a current position of -1
495         */

496   org.omg.DynamicAny.DynAny JavaDoc get_dyn_any () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc;
497
498   /**
499         * Extracts a Serializable object from this DynAny.
500         * The IDL ValueBase type is mapped to the Java Serializable type.
501         *
502         * @exception TypeMismatch if the accessed component in the DynAny is of a type
503         * that is not equivalent to the requested type.
504         * @exception TypeMismatch if called on a DynAny whose current component itself has components
505         * @exception InvalidValue if this DynAny has components but has a current position of -1
506         */

507   java.io.Serializable JavaDoc get_val () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc;
508
509   /**
510         * Sets the current position to index. The current position is indexed 0 to n-1, that is,
511         * index zero corresponds to the first component. The operation returns true if the resulting
512         * current position indicates a component of the DynAny and false if index indicates
513         * a position that does not correspond to a component.
514         * Calling seek with a negative index is legal. It sets the current position to -1 to indicate
515         * no component and returns false. Passing a non-negative index value for a DynAny that does not
516         * have a component at the corresponding position sets the current position to -1 and returns false.
517         */

518   boolean seek (int index);
519
520   /**
521         * Is equivalent to seek(0).
522         */

523   void rewind ();
524
525   /**
526         * Advances the current position to the next component.
527         * The operation returns true while the resulting current position indicates a component, false otherwise.
528         * A false return value leaves the current position at -1.
529         * Invoking next on a DynAny without components leaves the current position at -1 and returns false.
530         */

531   boolean next ();
532
533   /**
534         * Returns the number of components of a DynAny.
535         * For a DynAny without components, it returns zero.
536         * The operation only counts the components at the top level.
537         * For example, if component_count is invoked on a DynStruct with a single member,
538         * the return value is 1, irrespective of the type of the member.
539         * <UL>
540         * <LI>For sequences, the operation returns the current number of elements.
541         * <LI>For structures, exceptions, and value types, the operation returns the number of members.
542         * <LI>For arrays, the operation returns the number of elements.
543         * <LI>For unions, the operation returns 2 if the discriminator indicates that a named member is active,
544         * otherwise, it returns 1.
545         * <LI>For DynFixed and DynEnum, the operation returns zero.
546         * </UL>
547         */

548   int component_count ();
549
550   /**
551         * Returns the DynAny for the component at the current position.
552         * It does not advance the current position, so repeated calls to current_component
553         * without an intervening call to rewind, next, or seek return the same component.
554         * The returned DynAny object reference can be used to get/set the value of the current component.
555         * If the current component represents a complex type, the returned reference can be narrowed
556         * based on the TypeCode to get the interface corresponding to the to the complex type.
557         * Calling current_component on a DynAny that cannot have components,
558         * such as a DynEnum or an empty exception, raises TypeMismatch.
559         * Calling current_component on a DynAny whose current position is -1 returns a nil reference.
560         * The iteration operations, together with current_component, can be used
561         * to dynamically compose an any value. After creating a dynamic any, such as a DynStruct,
562         * current_component and next can be used to initialize all the components of the value.
563         * Once the dynamic value is completely initialized, to_any creates the corresponding any value.
564         *
565         * @exception TypeMismatch If called on a DynAny that cannot have components,
566         * such as a DynEnum or an empty exception
567         */

568   org.omg.DynamicAny.DynAny JavaDoc current_component () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc;
569 } // interface DynAnyOperations
570
Popular Tags