KickJava   Java API By Example, From Geeks To Geeks.

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


1 package org.omg.DynamicAny;
2
3
4 /**
5 * org/omg/DynamicAny/_DynUnionStub.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:12 AM GMT
9 */

10
11
12 /**
13     * DynUnion objects support the manipulation of IDL unions.
14     * A union can have only two valid current positions:
15     * <UL>
16     * <LI>zero, which denotes the discriminator
17     * <LI>one, which denotes the active member
18     * </UL>
19     * The component_count value for a union depends on the current discriminator:
20     * it is 2 for a union whose discriminator indicates a named member, and 1 otherwise.
21     */

22 public class _DynUnionStub extends org.omg.CORBA.portable.ObjectImpl JavaDoc implements org.omg.DynamicAny.DynUnion JavaDoc
23 {
24   final public static java.lang.Class JavaDoc _opsClass = DynUnionOperations JavaDoc.class;
25
26
27
28   /**
29         * Returns the current discriminator value.
30         */

31   public org.omg.DynamicAny.DynAny JavaDoc get_discriminator ()
32   {
33       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("get_discriminator", _opsClass);
34       DynUnionOperations JavaDoc $self = (DynUnionOperations JavaDoc) $so.servant;
35
36       try {
37          return $self.get_discriminator ();
38       } finally {
39           _servant_postinvoke ($so);
40       }
41   } // get_discriminator
42

43
44   /**
45         * Sets the discriminator of the DynUnion to the specified value.
46         * Setting the discriminator to a value that is consistent with the currently active union member
47         * does not affect the currently active member. Setting the discriminator to a value that is inconsistent
48         * with the currently active member deactivates the member and activates the member that is consistent
49         * with the new discriminator value (if there is a member for that value) by initializing the member
50         * to its default value.
51         * Setting the discriminator of a union sets the current position to 0 if the discriminator value
52         * indicates a non-existent union member (has_no_active_member returns true in this case).
53         * Otherwise, if the discriminator value indicates a named union member, the current position is set to 1
54         * (has_no_active_member returns false and component_count returns 2 in this case).
55         *
56         * @exception TypeMismatch if the TypeCode of the parameter is not equivalent to the TypeCode
57         * of the union's discriminator
58         */

59   public void set_discriminator (org.omg.DynamicAny.DynAny JavaDoc d) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc
60   {
61       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("set_discriminator", _opsClass);
62       DynUnionOperations JavaDoc $self = (DynUnionOperations JavaDoc) $so.servant;
63
64       try {
65          $self.set_discriminator (d);
66       } finally {
67           _servant_postinvoke ($so);
68       }
69   } // set_discriminator
70

71
72   /**
73         * Sets the discriminator to a value that is consistent with the value of the default case of a union.
74         * It sets the current position to zero and causes component_count to return 2.
75         *
76         * @exception TypeMismatch if the union does not have an explicit default case
77         */

78   public void set_to_default_member () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc
79   {
80       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("set_to_default_member", _opsClass);
81       DynUnionOperations JavaDoc $self = (DynUnionOperations JavaDoc) $so.servant;
82
83       try {
84          $self.set_to_default_member ();
85       } finally {
86           _servant_postinvoke ($so);
87       }
88   } // set_to_default_member
89

90
91   /**
92         * Sets the discriminator to a value that does not correspond to any of the unions case labels.
93         * It sets the current position to zero and causes component_count to return 1.
94         *
95         * @exception TypeMismatch if the union has an explicit default case or if it uses the entire range
96         * of discriminator values for explicit case labels
97         */

98   public void set_to_no_active_member () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc
99   {
100       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("set_to_no_active_member", _opsClass);
101       DynUnionOperations JavaDoc $self = (DynUnionOperations JavaDoc) $so.servant;
102
103       try {
104          $self.set_to_no_active_member ();
105       } finally {
106           _servant_postinvoke ($so);
107       }
108   } // set_to_no_active_member
109

110
111   /**
112         * Returns true if the union has no active member, that is, the unions value consists solely
113         * of its discriminator because the discriminator has a value that is not listed as an explicit case label.
114         * Calling this operation on a union that has a default case returns false.
115         * Calling this operation on a union that uses the entire range of discriminator values
116         * for explicit case labels returns false.
117         */

118   public boolean has_no_active_member ()
119   {
120       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("has_no_active_member", _opsClass);
121       DynUnionOperations JavaDoc $self = (DynUnionOperations JavaDoc) $so.servant;
122
123       try {
124          return $self.has_no_active_member ();
125       } finally {
126           _servant_postinvoke ($so);
127       }
128   } // has_no_active_member
129

130
131   /**
132         * Returns the TCKind value of the discriminators TypeCode.
133         */

134   public org.omg.CORBA.TCKind JavaDoc discriminator_kind ()
135   {
136       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("discriminator_kind", _opsClass);
137       DynUnionOperations JavaDoc $self = (DynUnionOperations JavaDoc) $so.servant;
138
139       try {
140          return $self.discriminator_kind ();
141       } finally {
142           _servant_postinvoke ($so);
143       }
144   } // discriminator_kind
145

146
147   /**
148         * Returns the TCKind value of the currently active members TypeCode.
149         *
150         * @exception InvalidValue if the union does not have a currently active member
151         */

152   public org.omg.CORBA.TCKind JavaDoc member_kind () throws org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
153   {
154       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("member_kind", _opsClass);
155       DynUnionOperations JavaDoc $self = (DynUnionOperations JavaDoc) $so.servant;
156
157       try {
158          return $self.member_kind ();
159       } finally {
160           _servant_postinvoke ($so);
161       }
162   } // member_kind
163

164
165   /**
166         * Returns the currently active member. Note that the returned reference remains valid only
167         * for as long as the currently active member does not change. Using the returned reference
168         * beyond the life time of the currently active member raises OBJECT_NOT_EXIST.
169         *
170         * @exception InvalidValue if the union has no active member
171         */

172   public org.omg.DynamicAny.DynAny JavaDoc member () throws org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
173   {
174       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("member", _opsClass);
175       DynUnionOperations JavaDoc $self = (DynUnionOperations JavaDoc) $so.servant;
176
177       try {
178          return $self.member ();
179       } finally {
180           _servant_postinvoke ($so);
181       }
182   } // member
183

184
185   /**
186         * Returns the name of the currently active member. If the unions TypeCode does not contain
187         * a member name for the currently active member, the operation returns an empty string.
188         *
189         * @exception InvalidValue if the union has no active member
190         */

191   public String JavaDoc member_name () throws org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
192   {
193       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("member_name", _opsClass);
194       DynUnionOperations JavaDoc $self = (DynUnionOperations JavaDoc) $so.servant;
195
196       try {
197          return $self.member_name ();
198       } finally {
199           _servant_postinvoke ($so);
200       }
201   } // member_name
202

203
204   /**
205         * Returns the TypeCode associated with this DynAny object.
206         * A DynAny object is created with a TypeCode value assigned to it.
207         * This TypeCode value determines the type of the value handled through the DynAny object.
208         * Note that the TypeCode associated with a DynAny object is initialized at the time the
209         * DynAny is created and cannot be changed during lifetime of the DynAny object.
210         *
211         * @return The TypeCode associated with this DynAny object
212         */

213   public org.omg.CORBA.TypeCode JavaDoc type ()
214   {
215       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("type", _opsClass);
216       DynUnionOperations JavaDoc $self = (DynUnionOperations JavaDoc) $so.servant;
217
218       try {
219          return $self.type ();
220       } finally {
221           _servant_postinvoke ($so);
222       }
223   } // type
224

225
226   /**
227         * Initializes the value associated with a DynAny object with the value
228         * associated with another DynAny object.
229         * The current position of the target DynAny is set to zero for values that have components
230         * and to -1 for values that do not have components.
231         *
232         * @param dyn_any
233         * @exception TypeMismatch if the type of the passed DynAny is not equivalent to the type of target DynAny
234         */

235   public void assign (org.omg.DynamicAny.DynAny JavaDoc dyn_any) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc
236   {
237       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("assign", _opsClass);
238       DynUnionOperations JavaDoc $self = (DynUnionOperations JavaDoc) $so.servant;
239
240       try {
241          $self.assign (dyn_any);
242       } finally {
243           _servant_postinvoke ($so);
244       }
245   } // assign
246

247
248   /**
249         * Initializes the value associated with a DynAny object with the value contained in an any.
250         * The current position of the target DynAny is set to zero for values that have components
251         * and to -1 for values that do not have components.
252         *
253         * @exception TypeMismatch if the type of the passed Any is not equivalent to the type of target DynAny
254         * @exception InvalidValue if the passed Any does not contain a legal value (such as a null string)
255         */

256   public void from_any (org.omg.CORBA.Any JavaDoc value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
257   {
258       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("from_any", _opsClass);
259       DynUnionOperations JavaDoc $self = (DynUnionOperations JavaDoc) $so.servant;
260
261       try {
262          $self.from_any (value);
263       } finally {
264           _servant_postinvoke ($so);
265       }
266   } // from_any
267

268
269   /**
270         * Creates an any value from a DynAny object.
271         * A copy of the TypeCode associated with the DynAny object is assigned to the resulting any.
272         * The value associated with the DynAny object is copied into the any.
273         *
274         * @return a new Any object with the same value and TypeCode
275         */

276   public org.omg.CORBA.Any JavaDoc to_any ()
277   {
278       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("to_any", _opsClass);
279       DynUnionOperations JavaDoc $self = (DynUnionOperations JavaDoc) $so.servant;
280
281       try {
282          return $self.to_any ();
283       } finally {
284           _servant_postinvoke ($so);
285       }
286   } // to_any
287

288
289   /**
290         * Compares two DynAny values for equality.
291         * Two DynAny values are equal if their TypeCodes are equivalent and, recursively, all component DynAnys
292         * have equal values.
293         * The current position of the two DynAnys being compared has no effect on the result of equal.
294         *
295         * @return true of the DynAnys are equal, false otherwise
296         */

297   public boolean equal (org.omg.DynamicAny.DynAny JavaDoc dyn_any)
298   {
299       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("equal", _opsClass);
300       DynUnionOperations JavaDoc $self = (DynUnionOperations JavaDoc) $so.servant;
301
302       try {
303          return $self.equal (dyn_any);
304       } finally {
305           _servant_postinvoke ($so);
306       }
307   } // equal
308

309
310   /**
311         * Destroys a DynAny object.
312         * This operation frees any resources used to represent the data value associated with a DynAny object.
313         * It must be invoked on references obtained from one of the creation operations on the ORB interface
314         * or on a reference returned by DynAny.copy() to avoid resource leaks.
315         * Invoking destroy on component DynAny objects (for example, on objects returned by the
316         * current_component operation) does nothing.
317         * Destruction of a DynAny object implies destruction of all DynAny objects obtained from it.
318         * That is, references to components of a destroyed DynAny become invalid.
319         * Invocations on such references raise OBJECT_NOT_EXIST.
320         * It is possible to manipulate a component of a DynAny beyond the life time of the DynAny
321         * from which the component was obtained by making a copy of the component with the copy operation
322         * before destroying the DynAny from which the component was obtained.
323         */

324   public void destroy ()
325   {
326       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("destroy", _opsClass);
327       DynUnionOperations JavaDoc $self = (DynUnionOperations JavaDoc) $so.servant;
328
329       try {
330          $self.destroy ();
331       } finally {
332           _servant_postinvoke ($so);
333       }
334   } // destroy
335

336
337   /**
338         * Creates a new DynAny object whose value is a deep copy of the DynAny on which it is invoked.
339         * The operation is polymorphic, that is, invoking it on one of the types derived from DynAny,
340         * such as DynStruct, creates the derived type but returns its reference as the DynAny base type.
341         *
342         * @return a deep copy of the DynAny object
343         */

344   public org.omg.DynamicAny.DynAny JavaDoc copy ()
345   {
346       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("copy", _opsClass);
347       DynUnionOperations JavaDoc $self = (DynUnionOperations JavaDoc) $so.servant;
348
349       try {
350          return $self.copy ();
351       } finally {
352           _servant_postinvoke ($so);
353       }
354   } // copy
355

356
357   /**
358         * Inserts a boolean value into the DynAny.
359         *
360         * @exception InvalidValue if this DynAny has components but has a current position of -1
361         * @exception TypeMismatch if called on a DynAny whose current component itself has components
362         */

363   public void insert_boolean (boolean value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
364   {
365       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("insert_boolean", _opsClass);
366       DynUnionOperations JavaDoc $self = (DynUnionOperations JavaDoc) $so.servant;
367
368       try {
369          $self.insert_boolean (value);
370       } finally {
371           _servant_postinvoke ($so);
372       }
373   } // insert_boolean
374

375
376   /**
377         * Inserts a byte value into the DynAny. The IDL octet data type is mapped to the Java byte data type.
378         *
379         * @exception InvalidValue if this DynAny has components but has a current position of -1
380         * @exception TypeMismatch if called on a DynAny whose current component itself has components
381         */

382   public void insert_octet (byte value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
383   {
384       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("insert_octet", _opsClass);
385       DynUnionOperations JavaDoc $self = (DynUnionOperations JavaDoc) $so.servant;
386
387       try {
388          $self.insert_octet (value);
389       } finally {
390           _servant_postinvoke ($so);
391       }
392   } // insert_octet
393

394
395   /**
396         * Inserts a char value into the DynAny.
397         *
398         * @exception InvalidValue if this DynAny has components but has a current position of -1
399         * @exception TypeMismatch if called on a DynAny whose current component itself has components
400         */

401   public void insert_char (char value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
402   {
403       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("insert_char", _opsClass);
404       DynUnionOperations JavaDoc $self = (DynUnionOperations JavaDoc) $so.servant;
405
406       try {
407          $self.insert_char (value);
408       } finally {
409           _servant_postinvoke ($so);
410       }
411   } // insert_char
412

413
414   /**
415         * Inserts a short value into the DynAny.
416         *
417         * @exception InvalidValue if this DynAny has components but has a current position of -1
418         * @exception TypeMismatch if called on a DynAny whose current component itself has components
419         */

420   public void insert_short (short value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
421   {
422       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("insert_short", _opsClass);
423       DynUnionOperations JavaDoc $self = (DynUnionOperations JavaDoc) $so.servant;
424
425       try {
426          $self.insert_short (value);
427       } finally {
428           _servant_postinvoke ($so);
429       }
430   } // insert_short
431

432
433   /**
434         * Inserts a short value into the DynAny. The IDL ushort data type is mapped to the Java short data type.
435         *
436         * @exception InvalidValue if this DynAny has components but has a current position of -1
437         * @exception TypeMismatch if called on a DynAny whose current component itself has components
438         */

439   public void insert_ushort (short value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
440   {
441       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("insert_ushort", _opsClass);
442       DynUnionOperations JavaDoc $self = (DynUnionOperations JavaDoc) $so.servant;
443
444       try {
445          $self.insert_ushort (value);
446       } finally {
447           _servant_postinvoke ($so);
448       }
449   } // insert_ushort
450

451
452   /**
453         * Inserts an integer value into the DynAny. The IDL long data type is mapped to the Java int data type.
454         *
455         * @exception InvalidValue if this DynAny has components but has a current position of -1
456         * @exception TypeMismatch if called on a DynAny whose current component itself has components
457         */

458   public void insert_long (int value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
459   {
460       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("insert_long", _opsClass);
461       DynUnionOperations JavaDoc $self = (DynUnionOperations JavaDoc) $so.servant;
462
463       try {
464          $self.insert_long (value);
465       } finally {
466           _servant_postinvoke ($so);
467       }
468   } // insert_long
469

470
471   /**
472         * Inserts an integer value into the DynAny. The IDL ulong data type is mapped to the Java int data type.
473         *
474         * @exception InvalidValue if this DynAny has components but has a current position of -1
475         * @exception TypeMismatch if called on a DynAny whose current component itself has components
476         */

477   public void insert_ulong (int value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
478   {
479       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("insert_ulong", _opsClass);
480       DynUnionOperations JavaDoc $self = (DynUnionOperations JavaDoc) $so.servant;
481
482       try {
483          $self.insert_ulong (value);
484       } finally {
485           _servant_postinvoke ($so);
486       }
487   } // insert_ulong
488

489
490   /**
491         * Inserts a float value into the DynAny.
492         *
493         * @exception InvalidValue if this DynAny has components but has a current position of -1
494         * @exception TypeMismatch if called on a DynAny whose current component itself has components
495         */

496   public void insert_float (float value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
497   {
498       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("insert_float", _opsClass);
499       DynUnionOperations JavaDoc $self = (DynUnionOperations JavaDoc) $so.servant;
500
501       try {
502          $self.insert_float (value);
503       } finally {
504           _servant_postinvoke ($so);
505       }
506   } // insert_float
507

508
509   /**
510         * Inserts a double value into the DynAny.
511         *
512         * @exception InvalidValue if this DynAny has components but has a current position of -1
513         * @exception TypeMismatch if called on a DynAny whose current component itself has components
514         */

515   public void insert_double (double value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
516   {
517       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("insert_double", _opsClass);
518       DynUnionOperations JavaDoc $self = (DynUnionOperations JavaDoc) $so.servant;
519
520       try {
521          $self.insert_double (value);
522       } finally {
523           _servant_postinvoke ($so);
524       }
525   } // insert_double
526

527
528   /**
529         * Inserts a string value into the DynAny.
530         * Both bounded and unbounded strings are inserted using this method.
531         *
532         * @exception InvalidValue if this DynAny has components but has a current position of -1
533         * @exception InvalidValue if the string inserted is longer than the bound of a bounded string
534         * @exception TypeMismatch if called on a DynAny whose current component itself has components
535         */

536   public void insert_string (String JavaDoc value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
537   {
538       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("insert_string", _opsClass);
539       DynUnionOperations JavaDoc $self = (DynUnionOperations JavaDoc) $so.servant;
540
541       try {
542          $self.insert_string (value);
543       } finally {
544           _servant_postinvoke ($so);
545       }
546   } // insert_string
547

548
549   /**
550         * Inserts a reference to a CORBA object into the DynAny.
551         *
552         * @exception InvalidValue if this DynAny has components but has a current position of -1
553         * @exception TypeMismatch if called on a DynAny whose current component itself has components
554         */

555   public void insert_reference (org.omg.CORBA.Object JavaDoc value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
556   {
557       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("insert_reference", _opsClass);
558       DynUnionOperations JavaDoc $self = (DynUnionOperations JavaDoc) $so.servant;
559
560       try {
561          $self.insert_reference (value);
562       } finally {
563           _servant_postinvoke ($so);
564       }
565   } // insert_reference
566

567
568   /**
569         * Inserts a TypeCode object into the DynAny.
570         *
571         * @exception InvalidValue if this DynAny has components but has a current position of -1
572         * @exception TypeMismatch if called on a DynAny whose current component itself has components
573         */

574   public void insert_typecode (org.omg.CORBA.TypeCode JavaDoc value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
575   {
576       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("insert_typecode", _opsClass);
577       DynUnionOperations JavaDoc $self = (DynUnionOperations JavaDoc) $so.servant;
578
579       try {
580          $self.insert_typecode (value);
581       } finally {
582           _servant_postinvoke ($so);
583       }
584   } // insert_typecode
585

586
587   /**
588         * Inserts a long value into the DynAny. The IDL long long data type is mapped to the Java long data type.
589         *
590         * @exception InvalidValue if this DynAny has components but has a current position of -1
591         * @exception TypeMismatch if called on a DynAny whose current component itself has components
592         */

593   public void insert_longlong (long value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
594   {
595       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("insert_longlong", _opsClass);
596       DynUnionOperations JavaDoc $self = (DynUnionOperations JavaDoc) $so.servant;
597
598       try {
599          $self.insert_longlong (value);
600       } finally {
601           _servant_postinvoke ($so);
602       }
603   } // insert_longlong
604

605
606   /**
607         * Inserts a long value into the DynAny.
608         * The IDL unsigned long long data type is mapped to the Java long data type.
609         *
610         * @exception InvalidValue if this DynAny has components but has a current position of -1
611         * @exception TypeMismatch if called on a DynAny whose current component itself has components
612         */

613   public void insert_ulonglong (long value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
614   {
615       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("insert_ulonglong", _opsClass);
616       DynUnionOperations JavaDoc $self = (DynUnionOperations JavaDoc) $so.servant;
617
618       try {
619          $self.insert_ulonglong (value);
620       } finally {
621           _servant_postinvoke ($so);
622       }
623   } // insert_ulonglong
624

625
626   /**
627         * Inserts a char value into the DynAny. The IDL wchar data type is mapped to the Java char data type.
628         *
629         * @exception InvalidValue if this DynAny has components but has a current position of -1
630         * @exception TypeMismatch if called on a DynAny whose current component itself has components
631         */

632   public void insert_wchar (char value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
633   {
634       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("insert_wchar", _opsClass);
635       DynUnionOperations JavaDoc $self = (DynUnionOperations JavaDoc) $so.servant;
636
637       try {
638          $self.insert_wchar (value);
639       } finally {
640           _servant_postinvoke ($so);
641       }
642   } // insert_wchar
643

644
645   /**
646         * Inserts a string value into the DynAny.
647         * Both bounded and unbounded strings are inserted using this method.
648         *
649         * @exception InvalidValue if this DynAny has components but has a current position of -1
650         * @exception InvalidValue if the string inserted is longer than the bound of a bounded string
651         */

652   public void insert_wstring (String JavaDoc value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
653   {
654       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("insert_wstring", _opsClass);
655       DynUnionOperations JavaDoc $self = (DynUnionOperations JavaDoc) $so.servant;
656
657       try {
658          $self.insert_wstring (value);
659       } finally {
660           _servant_postinvoke ($so);
661       }
662   } // insert_wstring
663

664
665   /**
666         * Inserts an Any value into the Any represented by this DynAny.
667         *
668         * @exception InvalidValue if this DynAny has components but has a current position of -1
669         * @exception TypeMismatch if called on a DynAny whose current component itself has components
670         */

671   public void insert_any (org.omg.CORBA.Any JavaDoc value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
672   {
673       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("insert_any", _opsClass);
674       DynUnionOperations JavaDoc $self = (DynUnionOperations JavaDoc) $so.servant;
675
676       try {
677          $self.insert_any (value);
678       } finally {
679           _servant_postinvoke ($so);
680       }
681   } // insert_any
682

683
684   /**
685         * Inserts the Any value contained in the parameter DynAny into the Any represented by this DynAny.
686         *
687         * @exception InvalidValue if this DynAny has components but has a current position of -1
688         * @exception TypeMismatch if called on a DynAny whose current component itself has components
689         */

690   public void insert_dyn_any (org.omg.DynamicAny.DynAny JavaDoc value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
691   {
692       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("insert_dyn_any", _opsClass);
693       DynUnionOperations JavaDoc $self = (DynUnionOperations JavaDoc) $so.servant;
694
695       try {
696          $self.insert_dyn_any (value);
697       } finally {
698           _servant_postinvoke ($so);
699       }
700   } // insert_dyn_any
701

702
703   /**
704         * Inserts a reference to a Serializable object into this DynAny.
705         * The IDL ValueBase type is mapped to the Java Serializable type.
706         *
707         * @exception InvalidValue if this DynAny has components but has a current position of -1
708         * @exception TypeMismatch if called on a DynAny whose current component itself has components
709         */

710   public void insert_val (java.io.Serializable JavaDoc value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
711   {
712       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("insert_val", _opsClass);
713       DynUnionOperations JavaDoc $self = (DynUnionOperations JavaDoc) $so.servant;
714
715       try {
716          $self.insert_val (value);
717       } finally {
718           _servant_postinvoke ($so);
719       }
720   } // insert_val
721

722
723   /**
724         * Extracts the boolean value from this DynAny.
725         *
726         * @exception TypeMismatch if the accessed component in the DynAny is of a type
727         * that is not equivalent to the requested type.
728         * @exception TypeMismatch if called on a DynAny whose current component itself has components
729         * @exception InvalidValue if this DynAny has components but has a current position of -1
730         */

731   public boolean get_boolean () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
732   {
733       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("get_boolean", _opsClass);
734       DynUnionOperations JavaDoc $self = (DynUnionOperations JavaDoc) $so.servant;
735
736       try {
737          return $self.get_boolean ();
738       } finally {
739           _servant_postinvoke ($so);
740       }
741   } // get_boolean
742

743
744   /**
745         * Extracts the byte value from this DynAny. The IDL octet data type is mapped to the Java byte data type.
746         *
747         * @exception TypeMismatch if the accessed component in the DynAny is of a type
748         * that is not equivalent to the requested type.
749         * @exception TypeMismatch if called on a DynAny whose current component itself has components
750         * @exception InvalidValue if this DynAny has components but has a current position of -1
751         */

752   public byte get_octet () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
753   {
754       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("get_octet", _opsClass);
755       DynUnionOperations JavaDoc $self = (DynUnionOperations JavaDoc) $so.servant;
756
757       try {
758          return $self.get_octet ();
759       } finally {
760           _servant_postinvoke ($so);
761       }
762   } // get_octet
763

764
765   /**
766         * Extracts the char value from this DynAny.
767         *
768         * @exception TypeMismatch if the accessed component in the DynAny is of a type
769         * that is not equivalent to the requested type.
770         * @exception TypeMismatch if called on a DynAny whose current component itself has components
771         * @exception InvalidValue if this DynAny has components but has a current position of -1
772         */

773   public char get_char () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
774   {
775       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("get_char", _opsClass);
776       DynUnionOperations JavaDoc $self = (DynUnionOperations JavaDoc) $so.servant;
777
778       try {
779          return $self.get_char ();
780       } finally {
781           _servant_postinvoke ($so);
782       }
783   } // get_char
784

785
786   /**
787         * Extracts the short value from this DynAny.
788         *
789         * @exception TypeMismatch if the accessed component in the DynAny is of a type
790         * that is not equivalent to the requested type.
791         * @exception TypeMismatch if called on a DynAny whose current component itself has components
792         * @exception InvalidValue if this DynAny has components but has a current position of -1
793         */

794   public short get_short () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
795   {
796       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("get_short", _opsClass);
797       DynUnionOperations JavaDoc $self = (DynUnionOperations JavaDoc) $so.servant;
798
799       try {
800          return $self.get_short ();
801       } finally {
802           _servant_postinvoke ($so);
803       }
804   } // get_short
805

806
807   /**
808         * Extracts the short value from this DynAny. The IDL ushort data type is mapped to the Java short data type.
809         *
810         * @exception TypeMismatch if the accessed component in the DynAny is of a type
811         * that is not equivalent to the requested type.
812         * @exception TypeMismatch if called on a DynAny whose current component itself has components
813         * @exception InvalidValue if this DynAny has components but has a current position of -1
814         */

815   public short get_ushort () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
816   {
817       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("get_ushort", _opsClass);
818       DynUnionOperations JavaDoc $self = (DynUnionOperations JavaDoc) $so.servant;
819
820       try {
821          return $self.get_ushort ();
822       } finally {
823           _servant_postinvoke ($so);
824       }
825   } // get_ushort
826

827
828   /**
829         * Extracts the integer value from this DynAny. The IDL long data type is mapped to the Java int data type.
830         *
831         * @exception TypeMismatch if the accessed component in the DynAny is of a type
832         * that is not equivalent to the requested type.
833         * @exception TypeMismatch if called on a DynAny whose current component itself has components
834         * @exception InvalidValue if this DynAny has components but has a current position of -1
835         */

836   public int get_long () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
837   {
838       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("get_long", _opsClass);
839       DynUnionOperations JavaDoc $self = (DynUnionOperations JavaDoc) $so.servant;
840
841       try {
842          return $self.get_long ();
843       } finally {
844           _servant_postinvoke ($so);
845       }
846   } // get_long
847

848
849   /**
850         * Extracts the integer value from this DynAny. The IDL ulong data type is mapped to the Java int data type.
851         *
852         * @exception TypeMismatch if the accessed component in the DynAny is of a type
853         * that is not equivalent to the requested type.
854         * @exception TypeMismatch if called on a DynAny whose current component itself has components
855         * @exception InvalidValue if this DynAny has components but has a current position of -1
856         */

857   public int get_ulong () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
858   {
859       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("get_ulong", _opsClass);
860       DynUnionOperations JavaDoc $self = (DynUnionOperations JavaDoc) $so.servant;
861
862       try {
863          return $self.get_ulong ();
864       } finally {
865           _servant_postinvoke ($so);
866       }
867   } // get_ulong
868

869
870   /**
871         * Extracts the float value from this DynAny.
872         *
873         * @exception TypeMismatch if the accessed component in the DynAny is of a type
874         * that is not equivalent to the requested type.
875         * @exception TypeMismatch if called on a DynAny whose current component itself has components
876         * @exception InvalidValue if this DynAny has components but has a current position of -1
877         */

878   public float get_float () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
879   {
880       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("get_float", _opsClass);
881       DynUnionOperations JavaDoc $self = (DynUnionOperations JavaDoc) $so.servant;
882
883       try {
884          return $self.get_float ();
885       } finally {
886           _servant_postinvoke ($so);
887       }
888   } // get_float
889

890
891   /**
892         * Extracts the double value from this DynAny.
893         *
894         * @exception TypeMismatch if the accessed component in the DynAny is of a type
895         * that is not equivalent to the requested type.
896         * @exception TypeMismatch if called on a DynAny whose current component itself has components
897         * @exception InvalidValue if this DynAny has components but has a current position of -1
898         */

899   public double get_double () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
900   {
901       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("get_double", _opsClass);
902       DynUnionOperations JavaDoc $self = (DynUnionOperations JavaDoc) $so.servant;
903
904       try {
905          return $self.get_double ();
906       } finally {
907           _servant_postinvoke ($so);
908       }
909   } // get_double
910

911
912   /**
913         * Extracts the string value from this DynAny.
914         * Both bounded and unbounded strings are extracted using this method.
915         *
916         * @exception TypeMismatch if the accessed component in the DynAny is of a type
917         * that is not equivalent to the requested type.
918         * @exception TypeMismatch if called on a DynAny whose current component itself has components
919         * @exception InvalidValue if this DynAny has components but has a current position of -1
920         */

921   public String JavaDoc get_string () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
922   {
923       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("get_string", _opsClass);
924       DynUnionOperations JavaDoc $self = (DynUnionOperations JavaDoc) $so.servant;
925
926       try {
927          return $self.get_string ();
928       } finally {
929           _servant_postinvoke ($so);
930       }
931   } // get_string
932

933
934   /**
935         * Extracts the reference to a CORBA Object from this DynAny.
936         *
937         * @exception TypeMismatch if the accessed component in the DynAny is of a type
938         * that is not equivalent to the requested type.
939         * @exception TypeMismatch if called on a DynAny whose current component itself has components
940         * @exception InvalidValue if this DynAny has components but has a current position of -1
941         */

942   public org.omg.CORBA.Object JavaDoc get_reference () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
943   {
944       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("get_reference", _opsClass);
945       DynUnionOperations JavaDoc $self = (DynUnionOperations JavaDoc) $so.servant;
946
947       try {
948          return $self.get_reference ();
949       } finally {
950           _servant_postinvoke ($so);
951       }
952   } // get_reference
953

954
955   /**
956         * Extracts the TypeCode object from this DynAny.
957         *
958         * @exception TypeMismatch if the accessed component in the DynAny is of a type
959         * that is not equivalent to the requested type.
960         * @exception TypeMismatch if called on a DynAny whose current component itself has components
961         * @exception InvalidValue if this DynAny has components but has a current position of -1
962         */

963   public org.omg.CORBA.TypeCode JavaDoc get_typecode () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
964   {
965       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("get_typecode", _opsClass);
966       DynUnionOperations JavaDoc $self = (DynUnionOperations JavaDoc) $so.servant;
967
968       try {
969          return $self.get_typecode ();
970       } finally {
971           _servant_postinvoke ($so);
972       }
973   } // get_typecode
974

975
976   /**
977         * Extracts the long value from this DynAny. The IDL long long data type is mapped to the Java long data type.
978         *
979         * @exception TypeMismatch if the accessed component in the DynAny is of a type
980         * that is not equivalent to the requested type.
981         * @exception TypeMismatch if called on a DynAny whose current component itself has components
982         * @exception InvalidValue if this DynAny has components but has a current position of -1
983         */

984   public long get_longlong () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
985   {
986       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("get_longlong", _opsClass);
987       DynUnionOperations JavaDoc $self = (DynUnionOperations JavaDoc) $so.servant;
988
989       try {
990          return $self.get_longlong ();
991       } finally {
992           _servant_postinvoke ($so);
993       }
994   } // get_longlong
995

996
997   /**
998         * Extracts the long value from this DynAny.
999         * The IDL unsigned long long data type is mapped to the Java long data type.
1000        *
1001        * @exception TypeMismatch if the accessed component in the DynAny is of a type
1002        * that is not equivalent to the requested type.
1003        * @exception TypeMismatch if called on a DynAny whose current component itself has components
1004        * @exception InvalidValue if this DynAny has components but has a current position of -1
1005        */

1006  public long get_ulonglong () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
1007  {
1008      org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("get_ulonglong", _opsClass);
1009      DynUnionOperations JavaDoc $self = (DynUnionOperations JavaDoc) $so.servant;
1010
1011      try {
1012         return $self.get_ulonglong ();
1013      } finally {
1014          _servant_postinvoke ($so);
1015      }
1016  } // get_ulonglong
1017

1018
1019  /**
1020        * Extracts the long value from this DynAny. The IDL wchar data type is mapped to the Java char data type.
1021        *
1022        * @exception TypeMismatch if the accessed component in the DynAny is of a type
1023        * that is not equivalent to the requested type.
1024        * @exception TypeMismatch if called on a DynAny whose current component itself has components
1025        * @exception InvalidValue if this DynAny has components but has a current position of -1
1026        */

1027  public char get_wchar () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
1028  {
1029      org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("get_wchar", _opsClass);
1030      DynUnionOperations JavaDoc $self = (DynUnionOperations JavaDoc) $so.servant;
1031
1032      try {
1033         return $self.get_wchar ();
1034      } finally {
1035          _servant_postinvoke ($so);
1036      }
1037  } // get_wchar
1038

1039
1040  /**
1041        * Extracts the string value from this DynAny.
1042        * Both bounded and unbounded strings are extracted using this method.
1043        *
1044        * @exception TypeMismatch if the accessed component in the DynAny is of a type
1045        * that is not equivalent to the requested type.
1046        * @exception TypeMismatch if called on a DynAny whose current component itself has components
1047        */

1048  public String JavaDoc get_wstring () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
1049  {
1050      org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("get_wstring", _opsClass);
1051      DynUnionOperations JavaDoc $self = (DynUnionOperations JavaDoc) $so.servant;
1052
1053      try {
1054         return $self.get_wstring ();
1055      } finally {
1056          _servant_postinvoke ($so);
1057      }
1058  } // get_wstring
1059

1060
1061  /**
1062        * Extracts an Any value contained in the Any represented by this DynAny.
1063        *
1064        * @exception TypeMismatch if the accessed component in the DynAny is of a type
1065        * that is not equivalent to the requested type.
1066        * @exception TypeMismatch if called on a DynAny whose current component itself has components
1067        * @exception InvalidValue if this DynAny has components but has a current position of -1
1068        */

1069  public org.omg.CORBA.Any JavaDoc get_any () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
1070  {
1071      org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("get_any", _opsClass);
1072      DynUnionOperations JavaDoc $self = (DynUnionOperations JavaDoc) $so.servant;
1073
1074      try {
1075         return $self.get_any ();
1076      } finally {
1077          _servant_postinvoke ($so);
1078      }
1079  } // get_any
1080

1081
1082  /**
1083        * Extracts the Any value contained in the Any represented by this DynAny and returns it wrapped
1084        * into a new DynAny.
1085        *
1086        * @exception TypeMismatch if the accessed component in the DynAny is of a type
1087        * that is not equivalent to the requested type.
1088        * @exception TypeMismatch if called on a DynAny whose current component itself has components
1089        * @exception InvalidValue if this DynAny has components but has a current position of -1
1090        */

1091  public org.omg.DynamicAny.DynAny JavaDoc get_dyn_any () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
1092  {
1093      org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("get_dyn_any", _opsClass);
1094      DynUnionOperations JavaDoc $self = (DynUnionOperations JavaDoc) $so.servant;
1095
1096      try {
1097         return $self.get_dyn_any ();
1098      } finally {
1099          _servant_postinvoke ($so);
1100      }
1101  } // get_dyn_any
1102

1103
1104  /**
1105        * Extracts a Serializable object from this DynAny.
1106        * The IDL ValueBase type is mapped to the Java Serializable type.
1107        *
1108        * @exception TypeMismatch if the accessed component in the DynAny is of a type
1109        * that is not equivalent to the requested type.
1110        * @exception TypeMismatch if called on a DynAny whose current component itself has components
1111        * @exception InvalidValue if this DynAny has components but has a current position of -1
1112        */

1113  public java.io.Serializable JavaDoc get_val () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
1114  {
1115      org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("get_val", _opsClass);
1116      DynUnionOperations JavaDoc $self = (DynUnionOperations JavaDoc) $so.servant;
1117
1118      try {
1119         return $self.get_val ();
1120      } finally {
1121          _servant_postinvoke ($so);
1122      }
1123  } // get_val
1124

1125
1126  /**
1127        * Sets the current position to index. The current position is indexed 0 to n-1, that is,
1128        * index zero corresponds to the first component. The operation returns true if the resulting
1129        * current position indicates a component of the DynAny and false if index indicates
1130        * a position that does not correspond to a component.
1131        * Calling seek with a negative index is legal. It sets the current position to -1 to indicate
1132        * no component and returns false. Passing a non-negative index value for a DynAny that does not
1133        * have a component at the corresponding position sets the current position to -1 and returns false.
1134        */

1135  public boolean seek (int index)
1136  {
1137      org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("seek", _opsClass);
1138      DynUnionOperations JavaDoc $self = (DynUnionOperations JavaDoc) $so.servant;
1139
1140      try {
1141         return $self.seek (index);
1142      } finally {
1143          _servant_postinvoke ($so);
1144      }
1145  } // seek
1146

1147
1148  /**
1149        * Is equivalent to seek(0).
1150        */

1151  public void rewind ()
1152  {
1153      org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("rewind", _opsClass);
1154      DynUnionOperations JavaDoc $self = (DynUnionOperations JavaDoc) $so.servant;
1155
1156      try {
1157         $self.rewind ();
1158      } finally {
1159          _servant_postinvoke ($so);
1160      }
1161  } // rewind
1162

1163
1164  /**
1165        * Advances the current position to the next component.
1166        * The operation returns true while the resulting current position indicates a component, false otherwise.
1167        * A false return value leaves the current position at -1.
1168        * Invoking next on a DynAny without components leaves the current position at -1 and returns false.
1169        */

1170  public boolean next ()
1171  {
1172      org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("next", _opsClass);
1173      DynUnionOperations JavaDoc $self = (DynUnionOperations JavaDoc) $so.servant;
1174
1175      try {
1176         return $self.next ();
1177      } finally {
1178          _servant_postinvoke ($so);
1179      }
1180  } // next
1181

1182
1183  /**
1184        * Returns the number of components of a DynAny.
1185        * For a DynAny without components, it returns zero.
1186        * The operation only counts the components at the top level.
1187        * For example, if component_count is invoked on a DynStruct with a single member,
1188        * the return value is 1, irrespective of the type of the member.
1189        * <UL>
1190        * <LI>For sequences, the operation returns the current number of elements.
1191        * <LI>For structures, exceptions, and value types, the operation returns the number of members.
1192        * <LI>For arrays, the operation returns the number of elements.
1193        * <LI>For unions, the operation returns 2 if the discriminator indicates that a named member is active,
1194        * otherwise, it returns 1.
1195        * <LI>For DynFixed and DynEnum, the operation returns zero.
1196        * </UL>
1197        */

1198  public int component_count ()
1199  {
1200      org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("component_count", _opsClass);
1201      DynUnionOperations JavaDoc $self = (DynUnionOperations JavaDoc) $so.servant;
1202
1203      try {
1204         return $self.component_count ();
1205      } finally {
1206          _servant_postinvoke ($so);
1207      }
1208  } // component_count
1209

1210
1211  /**
1212        * Returns the DynAny for the component at the current position.
1213        * It does not advance the current position, so repeated calls to current_component
1214        * without an intervening call to rewind, next, or seek return the same component.
1215        * The returned DynAny object reference can be used to get/set the value of the current component.
1216        * If the current component represents a complex type, the returned reference can be narrowed
1217        * based on the TypeCode to get the interface corresponding to the to the complex type.
1218        * Calling current_component on a DynAny that cannot have components,
1219        * such as a DynEnum or an empty exception, raises TypeMismatch.
1220        * Calling current_component on a DynAny whose current position is -1 returns a nil reference.
1221        * The iteration operations, together with current_component, can be used
1222        * to dynamically compose an any value. After creating a dynamic any, such as a DynStruct,
1223        * current_component and next can be used to initialize all the components of the value.
1224        * Once the dynamic value is completely initialized, to_any creates the corresponding any value.
1225        *
1226        * @exception TypeMismatch If called on a DynAny that cannot have components,
1227        * such as a DynEnum or an empty exception
1228        */

1229  public org.omg.DynamicAny.DynAny JavaDoc current_component () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc
1230  {
1231      org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("current_component", _opsClass);
1232      DynUnionOperations JavaDoc $self = (DynUnionOperations JavaDoc) $so.servant;
1233
1234      try {
1235         return $self.current_component ();
1236      } finally {
1237          _servant_postinvoke ($so);
1238      }
1239  } // current_component
1240

1241  // Type-specific CORBA::Object operations
1242
private static String JavaDoc[] __ids = {
1243    "IDL:omg.org/DynamicAny/DynUnion:1.0",
1244    "IDL:omg.org/DynamicAny/DynAny:1.0"};
1245
1246  public String JavaDoc[] _ids ()
1247  {
1248    return (String JavaDoc[])__ids.clone ();
1249  }
1250
1251  private void readObject (java.io.ObjectInputStream JavaDoc s) throws java.io.IOException JavaDoc
1252  {
1253     String JavaDoc str = s.readUTF ();
1254     String JavaDoc[] args = null;
1255     java.util.Properties JavaDoc props = null;
1256     org.omg.CORBA.Object JavaDoc obj = org.omg.CORBA.ORB.init (args, props).string_to_object (str);
1257     org.omg.CORBA.portable.Delegate JavaDoc delegate = ((org.omg.CORBA.portable.ObjectImpl JavaDoc) obj)._get_delegate ();
1258     _set_delegate (delegate);
1259  }
1260
1261  private void writeObject (java.io.ObjectOutputStream JavaDoc s) throws java.io.IOException JavaDoc
1262  {
1263     String JavaDoc[] args = null;
1264     java.util.Properties JavaDoc props = null;
1265     String JavaDoc str = org.omg.CORBA.ORB.init (args, props).object_to_string (this);
1266     s.writeUTF (str);
1267  }
1268} // class _DynUnionStub
1269
Popular Tags