KickJava   Java API By Example, From Geeks To Geeks.

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


1 package org.omg.DynamicAny;
2
3
4 /**
5 * org/omg/DynamicAny/_DynSequenceStub.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     * DynSequence objects support the manipulation of IDL sequences.
14     */

15 public class _DynSequenceStub extends org.omg.CORBA.portable.ObjectImpl JavaDoc implements org.omg.DynamicAny.DynSequence JavaDoc
16 {
17   final public static java.lang.Class JavaDoc _opsClass = DynSequenceOperations JavaDoc.class;
18
19
20
21   /**
22         * Returns the current length of the sequence.
23         */

24   public int get_length ()
25   {
26       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("get_length", _opsClass);
27       DynSequenceOperations JavaDoc $self = (DynSequenceOperations JavaDoc) $so.servant;
28
29       try {
30          return $self.get_length ();
31       } finally {
32           _servant_postinvoke ($so);
33       }
34   } // get_length
35

36
37   /**
38         * Sets the length of the sequence.
39         * Increasing the length of a sequence adds new elements at the tail without affecting the values
40         * of already existing elements. Newly added elements are default-initialized.
41         * Increasing the length of a sequence sets the current position to the first newly-added element
42         * if the previous current position was -1. Otherwise, if the previous current position was not -1,
43         * the current position is not affected.
44         * Decreasing the length of a sequence removes elements from the tail without affecting the value
45         * of those elements that remain. The new current position after decreasing the length of a sequence
46         * is determined as follows:
47         * <UL>
48         * <LI>If the length of the sequence is set to zero, the current position is set to -1.
49         * <LI>If the current position is -1 before decreasing the length, it remains at -1.
50         * <LI>If the current position indicates a valid element and that element is not removed when the length
51         * is decreased, the current position remains unaffected.
52         * <LI>If the current position indicates a valid element and that element is removed,
53         * the current position is set to -1.
54         * </UL>
55         *
56         * @exception InvalidValue if this is a bounded sequence and len is larger than the bound
57         */

58   public void set_length (int len) throws org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
59   {
60       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("set_length", _opsClass);
61       DynSequenceOperations JavaDoc $self = (DynSequenceOperations JavaDoc) $so.servant;
62
63       try {
64          $self.set_length (len);
65       } finally {
66           _servant_postinvoke ($so);
67       }
68   } // set_length
69

70
71   /**
72         * Returns the elements of the sequence.
73         */

74   public org.omg.CORBA.Any JavaDoc[] get_elements ()
75   {
76       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("get_elements", _opsClass);
77       DynSequenceOperations JavaDoc $self = (DynSequenceOperations JavaDoc) $so.servant;
78
79       try {
80          return $self.get_elements ();
81       } finally {
82           _servant_postinvoke ($so);
83       }
84   } // get_elements
85

86
87   /**
88         * Sets the elements of a sequence.
89         * The length of the DynSequence is set to the length of value. The current position is set to zero
90         * if value has non-zero length and to -1 if value is a zero-length sequence.
91         *
92         * @exception TypeMismatch if value contains one or more elements whose TypeCode is not equivalent
93         * to the element TypeCode of the DynSequence
94         * @exception InvalidValue if the length of value exceeds the bound of a bounded sequence
95         */

96   public void set_elements (org.omg.CORBA.Any JavaDoc[] value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
97   {
98       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("set_elements", _opsClass);
99       DynSequenceOperations JavaDoc $self = (DynSequenceOperations JavaDoc) $so.servant;
100
101       try {
102          $self.set_elements (value);
103       } finally {
104           _servant_postinvoke ($so);
105       }
106   } // set_elements
107

108
109   /**
110         * Returns the DynAnys representing the elements of the sequence.
111         */

112   public org.omg.DynamicAny.DynAny JavaDoc[] get_elements_as_dyn_any ()
113   {
114       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("get_elements_as_dyn_any", _opsClass);
115       DynSequenceOperations JavaDoc $self = (DynSequenceOperations JavaDoc) $so.servant;
116
117       try {
118          return $self.get_elements_as_dyn_any ();
119       } finally {
120           _servant_postinvoke ($so);
121       }
122   } // get_elements_as_dyn_any
123

124
125   /**
126         * Sets the elements of a sequence using DynAnys.
127         * The length of the DynSequence is set to the length of value. The current position is set to zero
128         * if value has non-zero length and to -1 if value is a zero-length sequence.
129         *
130         * @exception TypeMismatch if value contains one or more elements whose TypeCode is not equivalent
131         * to the element TypeCode of the DynSequence
132         * @exception InvalidValue if the length of value exceeds the bound of a bounded sequence
133         */

134   public void set_elements_as_dyn_any (org.omg.DynamicAny.DynAny JavaDoc[] value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
135   {
136       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("set_elements_as_dyn_any", _opsClass);
137       DynSequenceOperations JavaDoc $self = (DynSequenceOperations JavaDoc) $so.servant;
138
139       try {
140          $self.set_elements_as_dyn_any (value);
141       } finally {
142           _servant_postinvoke ($so);
143       }
144   } // set_elements_as_dyn_any
145

146
147   /**
148         * Returns the TypeCode associated with this DynAny object.
149         * A DynAny object is created with a TypeCode value assigned to it.
150         * This TypeCode value determines the type of the value handled through the DynAny object.
151         * Note that the TypeCode associated with a DynAny object is initialized at the time the
152         * DynAny is created and cannot be changed during lifetime of the DynAny object.
153         *
154         * @return The TypeCode associated with this DynAny object
155         */

156   public org.omg.CORBA.TypeCode JavaDoc type ()
157   {
158       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("type", _opsClass);
159       DynSequenceOperations JavaDoc $self = (DynSequenceOperations JavaDoc) $so.servant;
160
161       try {
162          return $self.type ();
163       } finally {
164           _servant_postinvoke ($so);
165       }
166   } // type
167

168
169   /**
170         * Initializes the value associated with a DynAny object with the value
171         * associated with another DynAny object.
172         * The current position of the target DynAny is set to zero for values that have components
173         * and to -1 for values that do not have components.
174         *
175         * @param dyn_any
176         * @exception TypeMismatch if the type of the passed DynAny is not equivalent to the type of target DynAny
177         */

178   public void assign (org.omg.DynamicAny.DynAny JavaDoc dyn_any) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc
179   {
180       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("assign", _opsClass);
181       DynSequenceOperations JavaDoc $self = (DynSequenceOperations JavaDoc) $so.servant;
182
183       try {
184          $self.assign (dyn_any);
185       } finally {
186           _servant_postinvoke ($so);
187       }
188   } // assign
189

190
191   /**
192         * Initializes the value associated with a DynAny object with the value contained in an any.
193         * The current position of the target DynAny is set to zero for values that have components
194         * and to -1 for values that do not have components.
195         *
196         * @exception TypeMismatch if the type of the passed Any is not equivalent to the type of target DynAny
197         * @exception InvalidValue if the passed Any does not contain a legal value (such as a null string)
198         */

199   public void from_any (org.omg.CORBA.Any JavaDoc value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
200   {
201       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("from_any", _opsClass);
202       DynSequenceOperations JavaDoc $self = (DynSequenceOperations JavaDoc) $so.servant;
203
204       try {
205          $self.from_any (value);
206       } finally {
207           _servant_postinvoke ($so);
208       }
209   } // from_any
210

211
212   /**
213         * Creates an any value from a DynAny object.
214         * A copy of the TypeCode associated with the DynAny object is assigned to the resulting any.
215         * The value associated with the DynAny object is copied into the any.
216         *
217         * @return a new Any object with the same value and TypeCode
218         */

219   public org.omg.CORBA.Any JavaDoc to_any ()
220   {
221       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("to_any", _opsClass);
222       DynSequenceOperations JavaDoc $self = (DynSequenceOperations JavaDoc) $so.servant;
223
224       try {
225          return $self.to_any ();
226       } finally {
227           _servant_postinvoke ($so);
228       }
229   } // to_any
230

231
232   /**
233         * Compares two DynAny values for equality.
234         * Two DynAny values are equal if their TypeCodes are equivalent and, recursively, all component DynAnys
235         * have equal values.
236         * The current position of the two DynAnys being compared has no effect on the result of equal.
237         *
238         * @return true of the DynAnys are equal, false otherwise
239         */

240   public boolean equal (org.omg.DynamicAny.DynAny JavaDoc dyn_any)
241   {
242       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("equal", _opsClass);
243       DynSequenceOperations JavaDoc $self = (DynSequenceOperations JavaDoc) $so.servant;
244
245       try {
246          return $self.equal (dyn_any);
247       } finally {
248           _servant_postinvoke ($so);
249       }
250   } // equal
251

252
253   /**
254         * Destroys a DynAny object.
255         * This operation frees any resources used to represent the data value associated with a DynAny object.
256         * It must be invoked on references obtained from one of the creation operations on the ORB interface
257         * or on a reference returned by DynAny.copy() to avoid resource leaks.
258         * Invoking destroy on component DynAny objects (for example, on objects returned by the
259         * current_component operation) does nothing.
260         * Destruction of a DynAny object implies destruction of all DynAny objects obtained from it.
261         * That is, references to components of a destroyed DynAny become invalid.
262         * Invocations on such references raise OBJECT_NOT_EXIST.
263         * It is possible to manipulate a component of a DynAny beyond the life time of the DynAny
264         * from which the component was obtained by making a copy of the component with the copy operation
265         * before destroying the DynAny from which the component was obtained.
266         */

267   public void destroy ()
268   {
269       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("destroy", _opsClass);
270       DynSequenceOperations JavaDoc $self = (DynSequenceOperations JavaDoc) $so.servant;
271
272       try {
273          $self.destroy ();
274       } finally {
275           _servant_postinvoke ($so);
276       }
277   } // destroy
278

279
280   /**
281         * Creates a new DynAny object whose value is a deep copy of the DynAny on which it is invoked.
282         * The operation is polymorphic, that is, invoking it on one of the types derived from DynAny,
283         * such as DynStruct, creates the derived type but returns its reference as the DynAny base type.
284         *
285         * @return a deep copy of the DynAny object
286         */

287   public org.omg.DynamicAny.DynAny JavaDoc copy ()
288   {
289       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("copy", _opsClass);
290       DynSequenceOperations JavaDoc $self = (DynSequenceOperations JavaDoc) $so.servant;
291
292       try {
293          return $self.copy ();
294       } finally {
295           _servant_postinvoke ($so);
296       }
297   } // copy
298

299
300   /**
301         * Inserts a boolean value into the DynAny.
302         *
303         * @exception InvalidValue if this DynAny has components but has a current position of -1
304         * @exception TypeMismatch if called on a DynAny whose current component itself has components
305         */

306   public void insert_boolean (boolean value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
307   {
308       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("insert_boolean", _opsClass);
309       DynSequenceOperations JavaDoc $self = (DynSequenceOperations JavaDoc) $so.servant;
310
311       try {
312          $self.insert_boolean (value);
313       } finally {
314           _servant_postinvoke ($so);
315       }
316   } // insert_boolean
317

318
319   /**
320         * Inserts a byte value into the DynAny. The IDL octet data type is mapped to the Java byte data type.
321         *
322         * @exception InvalidValue if this DynAny has components but has a current position of -1
323         * @exception TypeMismatch if called on a DynAny whose current component itself has components
324         */

325   public void insert_octet (byte value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
326   {
327       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("insert_octet", _opsClass);
328       DynSequenceOperations JavaDoc $self = (DynSequenceOperations JavaDoc) $so.servant;
329
330       try {
331          $self.insert_octet (value);
332       } finally {
333           _servant_postinvoke ($so);
334       }
335   } // insert_octet
336

337
338   /**
339         * Inserts a char value into the DynAny.
340         *
341         * @exception InvalidValue if this DynAny has components but has a current position of -1
342         * @exception TypeMismatch if called on a DynAny whose current component itself has components
343         */

344   public void insert_char (char value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
345   {
346       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("insert_char", _opsClass);
347       DynSequenceOperations JavaDoc $self = (DynSequenceOperations JavaDoc) $so.servant;
348
349       try {
350          $self.insert_char (value);
351       } finally {
352           _servant_postinvoke ($so);
353       }
354   } // insert_char
355

356
357   /**
358         * Inserts a short 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_short (short 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_short", _opsClass);
366       DynSequenceOperations JavaDoc $self = (DynSequenceOperations JavaDoc) $so.servant;
367
368       try {
369          $self.insert_short (value);
370       } finally {
371           _servant_postinvoke ($so);
372       }
373   } // insert_short
374

375
376   /**
377         * Inserts a short value into the DynAny. The IDL ushort data type is mapped to the Java short 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_ushort (short 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_ushort", _opsClass);
385       DynSequenceOperations JavaDoc $self = (DynSequenceOperations JavaDoc) $so.servant;
386
387       try {
388          $self.insert_ushort (value);
389       } finally {
390           _servant_postinvoke ($so);
391       }
392   } // insert_ushort
393

394
395   /**
396         * Inserts an integer value into the DynAny. The IDL long data type is mapped to the Java int data type.
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_long (int 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_long", _opsClass);
404       DynSequenceOperations JavaDoc $self = (DynSequenceOperations JavaDoc) $so.servant;
405
406       try {
407          $self.insert_long (value);
408       } finally {
409           _servant_postinvoke ($so);
410       }
411   } // insert_long
412

413
414   /**
415         * Inserts an integer value into the DynAny. The IDL ulong data type is mapped to the Java int data type.
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_ulong (int 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_ulong", _opsClass);
423       DynSequenceOperations JavaDoc $self = (DynSequenceOperations JavaDoc) $so.servant;
424
425       try {
426          $self.insert_ulong (value);
427       } finally {
428           _servant_postinvoke ($so);
429       }
430   } // insert_ulong
431

432
433   /**
434         * Inserts a float value into the DynAny.
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_float (float 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_float", _opsClass);
442       DynSequenceOperations JavaDoc $self = (DynSequenceOperations JavaDoc) $so.servant;
443
444       try {
445          $self.insert_float (value);
446       } finally {
447           _servant_postinvoke ($so);
448       }
449   } // insert_float
450

451
452   /**
453         * Inserts a double value into the DynAny.
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_double (double 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_double", _opsClass);
461       DynSequenceOperations JavaDoc $self = (DynSequenceOperations JavaDoc) $so.servant;
462
463       try {
464          $self.insert_double (value);
465       } finally {
466           _servant_postinvoke ($so);
467       }
468   } // insert_double
469

470
471   /**
472         * Inserts a string value into the DynAny.
473         * Both bounded and unbounded strings are inserted using this method.
474         *
475         * @exception InvalidValue if this DynAny has components but has a current position of -1
476         * @exception InvalidValue if the string inserted is longer than the bound of a bounded string
477         * @exception TypeMismatch if called on a DynAny whose current component itself has components
478         */

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

491
492   /**
493         * Inserts a reference to a CORBA object into the DynAny.
494         *
495         * @exception InvalidValue if this DynAny has components but has a current position of -1
496         * @exception TypeMismatch if called on a DynAny whose current component itself has components
497         */

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

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

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

529
530   /**
531         * Inserts a long value into the DynAny. The IDL long long data type is mapped to the Java long data type.
532         *
533         * @exception InvalidValue if this DynAny has components but has a current position of -1
534         * @exception TypeMismatch if called on a DynAny whose current component itself has components
535         */

536   public void insert_longlong (long 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_longlong", _opsClass);
539       DynSequenceOperations JavaDoc $self = (DynSequenceOperations JavaDoc) $so.servant;
540
541       try {
542          $self.insert_longlong (value);
543       } finally {
544           _servant_postinvoke ($so);
545       }
546   } // insert_longlong
547

548
549   /**
550         * Inserts a long value into the DynAny.
551         * The IDL unsigned long long data type is mapped to the Java long data type.
552         *
553         * @exception InvalidValue if this DynAny has components but has a current position of -1
554         * @exception TypeMismatch if called on a DynAny whose current component itself has components
555         */

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

568
569   /**
570         * Inserts a char value into the DynAny. The IDL wchar data type is mapped to the Java char data type.
571         *
572         * @exception InvalidValue if this DynAny has components but has a current position of -1
573         * @exception TypeMismatch if called on a DynAny whose current component itself has components
574         */

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

587
588   /**
589         * Inserts a string value into the DynAny.
590         * Both bounded and unbounded strings are inserted using this method.
591         *
592         * @exception InvalidValue if this DynAny has components but has a current position of -1
593         * @exception InvalidValue if the string inserted is longer than the bound of a bounded string
594         */

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

607
608   /**
609         * Inserts an Any value into the Any represented by this DynAny.
610         *
611         * @exception InvalidValue if this DynAny has components but has a current position of -1
612         * @exception TypeMismatch if called on a DynAny whose current component itself has components
613         */

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

626
627   /**
628         * Inserts the Any value contained in the parameter DynAny into the Any represented by this DynAny.
629         *
630         * @exception InvalidValue if this DynAny has components but has a current position of -1
631         * @exception TypeMismatch if called on a DynAny whose current component itself has components
632         */

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

645
646   /**
647         * Inserts a reference to a Serializable object into this DynAny.
648         * The IDL ValueBase type is mapped to the Java Serializable type.
649         *
650         * @exception InvalidValue if this DynAny has components but has a current position of -1
651         * @exception TypeMismatch if called on a DynAny whose current component itself has components
652         */

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

665
666   /**
667         * Extracts the boolean value from this DynAny.
668         *
669         * @exception TypeMismatch if the accessed component in the DynAny is of a type
670         * that is not equivalent to the requested type.
671         * @exception TypeMismatch if called on a DynAny whose current component itself has components
672         * @exception InvalidValue if this DynAny has components but has a current position of -1
673         */

674   public boolean get_boolean () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
675   {
676       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("get_boolean", _opsClass);
677       DynSequenceOperations JavaDoc $self = (DynSequenceOperations JavaDoc) $so.servant;
678
679       try {
680          return $self.get_boolean ();
681       } finally {
682           _servant_postinvoke ($so);
683       }
684   } // get_boolean
685

686
687   /**
688         * Extracts the byte value from this DynAny. The IDL octet data type is mapped to the Java byte data type.
689         *
690         * @exception TypeMismatch if the accessed component in the DynAny is of a type
691         * that is not equivalent to the requested type.
692         * @exception TypeMismatch if called on a DynAny whose current component itself has components
693         * @exception InvalidValue if this DynAny has components but has a current position of -1
694         */

695   public byte get_octet () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
696   {
697       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("get_octet", _opsClass);
698       DynSequenceOperations JavaDoc $self = (DynSequenceOperations JavaDoc) $so.servant;
699
700       try {
701          return $self.get_octet ();
702       } finally {
703           _servant_postinvoke ($so);
704       }
705   } // get_octet
706

707
708   /**
709         * Extracts the char value from this DynAny.
710         *
711         * @exception TypeMismatch if the accessed component in the DynAny is of a type
712         * that is not equivalent to the requested type.
713         * @exception TypeMismatch if called on a DynAny whose current component itself has components
714         * @exception InvalidValue if this DynAny has components but has a current position of -1
715         */

716   public char get_char () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
717   {
718       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("get_char", _opsClass);
719       DynSequenceOperations JavaDoc $self = (DynSequenceOperations JavaDoc) $so.servant;
720
721       try {
722          return $self.get_char ();
723       } finally {
724           _servant_postinvoke ($so);
725       }
726   } // get_char
727

728
729   /**
730         * Extracts the short value from this DynAny.
731         *
732         * @exception TypeMismatch if the accessed component in the DynAny is of a type
733         * that is not equivalent to the requested type.
734         * @exception TypeMismatch if called on a DynAny whose current component itself has components
735         * @exception InvalidValue if this DynAny has components but has a current position of -1
736         */

737   public short get_short () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
738   {
739       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("get_short", _opsClass);
740       DynSequenceOperations JavaDoc $self = (DynSequenceOperations JavaDoc) $so.servant;
741
742       try {
743          return $self.get_short ();
744       } finally {
745           _servant_postinvoke ($so);
746       }
747   } // get_short
748

749
750   /**
751         * Extracts the short value from this DynAny. The IDL ushort data type is mapped to the Java short data type.
752         *
753         * @exception TypeMismatch if the accessed component in the DynAny is of a type
754         * that is not equivalent to the requested type.
755         * @exception TypeMismatch if called on a DynAny whose current component itself has components
756         * @exception InvalidValue if this DynAny has components but has a current position of -1
757         */

758   public short get_ushort () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
759   {
760       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("get_ushort", _opsClass);
761       DynSequenceOperations JavaDoc $self = (DynSequenceOperations JavaDoc) $so.servant;
762
763       try {
764          return $self.get_ushort ();
765       } finally {
766           _servant_postinvoke ($so);
767       }
768   } // get_ushort
769

770
771   /**
772         * Extracts the integer value from this DynAny. The IDL long data type is mapped to the Java int data type.
773         *
774         * @exception TypeMismatch if the accessed component in the DynAny is of a type
775         * that is not equivalent to the requested type.
776         * @exception TypeMismatch if called on a DynAny whose current component itself has components
777         * @exception InvalidValue if this DynAny has components but has a current position of -1
778         */

779   public int get_long () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
780   {
781       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("get_long", _opsClass);
782       DynSequenceOperations JavaDoc $self = (DynSequenceOperations JavaDoc) $so.servant;
783
784       try {
785          return $self.get_long ();
786       } finally {
787           _servant_postinvoke ($so);
788       }
789   } // get_long
790

791
792   /**
793         * Extracts the integer value from this DynAny. The IDL ulong data type is mapped to the Java int data type.
794         *
795         * @exception TypeMismatch if the accessed component in the DynAny is of a type
796         * that is not equivalent to the requested type.
797         * @exception TypeMismatch if called on a DynAny whose current component itself has components
798         * @exception InvalidValue if this DynAny has components but has a current position of -1
799         */

800   public int get_ulong () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
801   {
802       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("get_ulong", _opsClass);
803       DynSequenceOperations JavaDoc $self = (DynSequenceOperations JavaDoc) $so.servant;
804
805       try {
806          return $self.get_ulong ();
807       } finally {
808           _servant_postinvoke ($so);
809       }
810   } // get_ulong
811

812
813   /**
814         * Extracts the float value from this DynAny.
815         *
816         * @exception TypeMismatch if the accessed component in the DynAny is of a type
817         * that is not equivalent to the requested type.
818         * @exception TypeMismatch if called on a DynAny whose current component itself has components
819         * @exception InvalidValue if this DynAny has components but has a current position of -1
820         */

821   public float get_float () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
822   {
823       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("get_float", _opsClass);
824       DynSequenceOperations JavaDoc $self = (DynSequenceOperations JavaDoc) $so.servant;
825
826       try {
827          return $self.get_float ();
828       } finally {
829           _servant_postinvoke ($so);
830       }
831   } // get_float
832

833
834   /**
835         * Extracts the double value from this DynAny.
836         *
837         * @exception TypeMismatch if the accessed component in the DynAny is of a type
838         * that is not equivalent to the requested type.
839         * @exception TypeMismatch if called on a DynAny whose current component itself has components
840         * @exception InvalidValue if this DynAny has components but has a current position of -1
841         */

842   public double get_double () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
843   {
844       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("get_double", _opsClass);
845       DynSequenceOperations JavaDoc $self = (DynSequenceOperations JavaDoc) $so.servant;
846
847       try {
848          return $self.get_double ();
849       } finally {
850           _servant_postinvoke ($so);
851       }
852   } // get_double
853

854
855   /**
856         * Extracts the string value from this DynAny.
857         * Both bounded and unbounded strings are extracted using this method.
858         *
859         * @exception TypeMismatch if the accessed component in the DynAny is of a type
860         * that is not equivalent to the requested type.
861         * @exception TypeMismatch if called on a DynAny whose current component itself has components
862         * @exception InvalidValue if this DynAny has components but has a current position of -1
863         */

864   public String JavaDoc get_string () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
865   {
866       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("get_string", _opsClass);
867       DynSequenceOperations JavaDoc $self = (DynSequenceOperations JavaDoc) $so.servant;
868
869       try {
870          return $self.get_string ();
871       } finally {
872           _servant_postinvoke ($so);
873       }
874   } // get_string
875

876
877   /**
878         * Extracts the reference to a CORBA Object from this DynAny.
879         *
880         * @exception TypeMismatch if the accessed component in the DynAny is of a type
881         * that is not equivalent to the requested type.
882         * @exception TypeMismatch if called on a DynAny whose current component itself has components
883         * @exception InvalidValue if this DynAny has components but has a current position of -1
884         */

885   public org.omg.CORBA.Object JavaDoc get_reference () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
886   {
887       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("get_reference", _opsClass);
888       DynSequenceOperations JavaDoc $self = (DynSequenceOperations JavaDoc) $so.servant;
889
890       try {
891          return $self.get_reference ();
892       } finally {
893           _servant_postinvoke ($so);
894       }
895   } // get_reference
896

897
898   /**
899         * Extracts the TypeCode object from this DynAny.
900         *
901         * @exception TypeMismatch if the accessed component in the DynAny is of a type
902         * that is not equivalent to the requested type.
903         * @exception TypeMismatch if called on a DynAny whose current component itself has components
904         * @exception InvalidValue if this DynAny has components but has a current position of -1
905         */

906   public org.omg.CORBA.TypeCode JavaDoc get_typecode () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
907   {
908       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("get_typecode", _opsClass);
909       DynSequenceOperations JavaDoc $self = (DynSequenceOperations JavaDoc) $so.servant;
910
911       try {
912          return $self.get_typecode ();
913       } finally {
914           _servant_postinvoke ($so);
915       }
916   } // get_typecode
917

918
919   /**
920         * Extracts the long value from this DynAny. The IDL long long data type is mapped to the Java long data type.
921         *
922         * @exception TypeMismatch if the accessed component in the DynAny is of a type
923         * that is not equivalent to the requested type.
924         * @exception TypeMismatch if called on a DynAny whose current component itself has components
925         * @exception InvalidValue if this DynAny has components but has a current position of -1
926         */

927   public long get_longlong () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
928   {
929       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("get_longlong", _opsClass);
930       DynSequenceOperations JavaDoc $self = (DynSequenceOperations JavaDoc) $so.servant;
931
932       try {
933          return $self.get_longlong ();
934       } finally {
935           _servant_postinvoke ($so);
936       }
937   } // get_longlong
938

939
940   /**
941         * Extracts the long value from this DynAny.
942         * The IDL unsigned long long data type is mapped to the Java long data type.
943         *
944         * @exception TypeMismatch if the accessed component in the DynAny is of a type
945         * that is not equivalent to the requested type.
946         * @exception TypeMismatch if called on a DynAny whose current component itself has components
947         * @exception InvalidValue if this DynAny has components but has a current position of -1
948         */

949   public long get_ulonglong () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
950   {
951       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("get_ulonglong", _opsClass);
952       DynSequenceOperations JavaDoc $self = (DynSequenceOperations JavaDoc) $so.servant;
953
954       try {
955          return $self.get_ulonglong ();
956       } finally {
957           _servant_postinvoke ($so);
958       }
959   } // get_ulonglong
960

961
962   /**
963         * Extracts the long value from this DynAny. The IDL wchar data type is mapped to the Java char data type.
964         *
965         * @exception TypeMismatch if the accessed component in the DynAny is of a type
966         * that is not equivalent to the requested type.
967         * @exception TypeMismatch if called on a DynAny whose current component itself has components
968         * @exception InvalidValue if this DynAny has components but has a current position of -1
969         */

970   public char get_wchar () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
971   {
972       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("get_wchar", _opsClass);
973       DynSequenceOperations JavaDoc $self = (DynSequenceOperations JavaDoc) $so.servant;
974
975       try {
976          return $self.get_wchar ();
977       } finally {
978           _servant_postinvoke ($so);
979       }
980   } // get_wchar
981

982
983   /**
984         * Extracts the string value from this DynAny.
985         * Both bounded and unbounded strings are extracted using this method.
986         *
987         * @exception TypeMismatch if the accessed component in the DynAny is of a type
988         * that is not equivalent to the requested type.
989         * @exception TypeMismatch if called on a DynAny whose current component itself has components
990         */

991   public String JavaDoc get_wstring () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
992   {
993       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("get_wstring", _opsClass);
994       DynSequenceOperations JavaDoc $self = (DynSequenceOperations JavaDoc) $so.servant;
995
996       try {
997          return $self.get_wstring ();
998       } finally {
999           _servant_postinvoke ($so);
1000      }
1001  } // get_wstring
1002

1003
1004  /**
1005        * Extracts an Any value contained in the Any represented by this DynAny.
1006        *
1007        * @exception TypeMismatch if the accessed component in the DynAny is of a type
1008        * that is not equivalent to the requested type.
1009        * @exception TypeMismatch if called on a DynAny whose current component itself has components
1010        * @exception InvalidValue if this DynAny has components but has a current position of -1
1011        */

1012  public org.omg.CORBA.Any JavaDoc get_any () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
1013  {
1014      org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("get_any", _opsClass);
1015      DynSequenceOperations JavaDoc $self = (DynSequenceOperations JavaDoc) $so.servant;
1016
1017      try {
1018         return $self.get_any ();
1019      } finally {
1020          _servant_postinvoke ($so);
1021      }
1022  } // get_any
1023

1024
1025  /**
1026        * Extracts the Any value contained in the Any represented by this DynAny and returns it wrapped
1027        * into a new DynAny.
1028        *
1029        * @exception TypeMismatch if the accessed component in the DynAny is of a type
1030        * that is not equivalent to the requested type.
1031        * @exception TypeMismatch if called on a DynAny whose current component itself has components
1032        * @exception InvalidValue if this DynAny has components but has a current position of -1
1033        */

1034  public org.omg.DynamicAny.DynAny JavaDoc get_dyn_any () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
1035  {
1036      org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("get_dyn_any", _opsClass);
1037      DynSequenceOperations JavaDoc $self = (DynSequenceOperations JavaDoc) $so.servant;
1038
1039      try {
1040         return $self.get_dyn_any ();
1041      } finally {
1042          _servant_postinvoke ($so);
1043      }
1044  } // get_dyn_any
1045

1046
1047  /**
1048        * Extracts a Serializable object from this DynAny.
1049        * The IDL ValueBase type is mapped to the Java Serializable type.
1050        *
1051        * @exception TypeMismatch if the accessed component in the DynAny is of a type
1052        * that is not equivalent to the requested type.
1053        * @exception TypeMismatch if called on a DynAny whose current component itself has components
1054        * @exception InvalidValue if this DynAny has components but has a current position of -1
1055        */

1056  public java.io.Serializable JavaDoc get_val () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
1057  {
1058      org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("get_val", _opsClass);
1059      DynSequenceOperations JavaDoc $self = (DynSequenceOperations JavaDoc) $so.servant;
1060
1061      try {
1062         return $self.get_val ();
1063      } finally {
1064          _servant_postinvoke ($so);
1065      }
1066  } // get_val
1067

1068
1069  /**
1070        * Sets the current position to index. The current position is indexed 0 to n-1, that is,
1071        * index zero corresponds to the first component. The operation returns true if the resulting
1072        * current position indicates a component of the DynAny and false if index indicates
1073        * a position that does not correspond to a component.
1074        * Calling seek with a negative index is legal. It sets the current position to -1 to indicate
1075        * no component and returns false. Passing a non-negative index value for a DynAny that does not
1076        * have a component at the corresponding position sets the current position to -1 and returns false.
1077        */

1078  public boolean seek (int index)
1079  {
1080      org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("seek", _opsClass);
1081      DynSequenceOperations JavaDoc $self = (DynSequenceOperations JavaDoc) $so.servant;
1082
1083      try {
1084         return $self.seek (index);
1085      } finally {
1086          _servant_postinvoke ($so);
1087      }
1088  } // seek
1089

1090
1091  /**
1092        * Is equivalent to seek(0).
1093        */

1094  public void rewind ()
1095  {
1096      org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("rewind", _opsClass);
1097      DynSequenceOperations JavaDoc $self = (DynSequenceOperations JavaDoc) $so.servant;
1098
1099      try {
1100         $self.rewind ();
1101      } finally {
1102          _servant_postinvoke ($so);
1103      }
1104  } // rewind
1105

1106
1107  /**
1108        * Advances the current position to the next component.
1109        * The operation returns true while the resulting current position indicates a component, false otherwise.
1110        * A false return value leaves the current position at -1.
1111        * Invoking next on a DynAny without components leaves the current position at -1 and returns false.
1112        */

1113  public boolean next ()
1114  {
1115      org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("next", _opsClass);
1116      DynSequenceOperations JavaDoc $self = (DynSequenceOperations JavaDoc) $so.servant;
1117
1118      try {
1119         return $self.next ();
1120      } finally {
1121          _servant_postinvoke ($so);
1122      }
1123  } // next
1124

1125
1126  /**
1127        * Returns the number of components of a DynAny.
1128        * For a DynAny without components, it returns zero.
1129        * The operation only counts the components at the top level.
1130        * For example, if component_count is invoked on a DynStruct with a single member,
1131        * the return value is 1, irrespective of the type of the member.
1132        * <UL>
1133        * <LI>For sequences, the operation returns the current number of elements.
1134        * <LI>For structures, exceptions, and value types, the operation returns the number of members.
1135        * <LI>For arrays, the operation returns the number of elements.
1136        * <LI>For unions, the operation returns 2 if the discriminator indicates that a named member is active,
1137        * otherwise, it returns 1.
1138        * <LI>For DynFixed and DynEnum, the operation returns zero.
1139        * </UL>
1140        */

1141  public int component_count ()
1142  {
1143      org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("component_count", _opsClass);
1144      DynSequenceOperations JavaDoc $self = (DynSequenceOperations JavaDoc) $so.servant;
1145
1146      try {
1147         return $self.component_count ();
1148      } finally {
1149          _servant_postinvoke ($so);
1150      }
1151  } // component_count
1152

1153
1154  /**
1155        * Returns the DynAny for the component at the current position.
1156        * It does not advance the current position, so repeated calls to current_component
1157        * without an intervening call to rewind, next, or seek return the same component.
1158        * The returned DynAny object reference can be used to get/set the value of the current component.
1159        * If the current component represents a complex type, the returned reference can be narrowed
1160        * based on the TypeCode to get the interface corresponding to the to the complex type.
1161        * Calling current_component on a DynAny that cannot have components,
1162        * such as a DynEnum or an empty exception, raises TypeMismatch.
1163        * Calling current_component on a DynAny whose current position is -1 returns a nil reference.
1164        * The iteration operations, together with current_component, can be used
1165        * to dynamically compose an any value. After creating a dynamic any, such as a DynStruct,
1166        * current_component and next can be used to initialize all the components of the value.
1167        * Once the dynamic value is completely initialized, to_any creates the corresponding any value.
1168        *
1169        * @exception TypeMismatch If called on a DynAny that cannot have components,
1170        * such as a DynEnum or an empty exception
1171        */

1172  public org.omg.DynamicAny.DynAny JavaDoc current_component () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc
1173  {
1174      org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("current_component", _opsClass);
1175      DynSequenceOperations JavaDoc $self = (DynSequenceOperations JavaDoc) $so.servant;
1176
1177      try {
1178         return $self.current_component ();
1179      } finally {
1180          _servant_postinvoke ($so);
1181      }
1182  } // current_component
1183

1184  // Type-specific CORBA::Object operations
1185
private static String JavaDoc[] __ids = {
1186    "IDL:omg.org/DynamicAny/DynSequence:1.0",
1187    "IDL:omg.org/DynamicAny/DynAny:1.0"};
1188
1189  public String JavaDoc[] _ids ()
1190  {
1191    return (String JavaDoc[])__ids.clone ();
1192  }
1193
1194  private void readObject (java.io.ObjectInputStream JavaDoc s) throws java.io.IOException JavaDoc
1195  {
1196     String JavaDoc str = s.readUTF ();
1197     String JavaDoc[] args = null;
1198     java.util.Properties JavaDoc props = null;
1199     org.omg.CORBA.Object JavaDoc obj = org.omg.CORBA.ORB.init (args, props).string_to_object (str);
1200     org.omg.CORBA.portable.Delegate JavaDoc delegate = ((org.omg.CORBA.portable.ObjectImpl JavaDoc) obj)._get_delegate ();
1201     _set_delegate (delegate);
1202  }
1203
1204  private void writeObject (java.io.ObjectOutputStream JavaDoc s) throws java.io.IOException JavaDoc
1205  {
1206     String JavaDoc[] args = null;
1207     java.util.Properties JavaDoc props = null;
1208     String JavaDoc str = org.omg.CORBA.ORB.init (args, props).object_to_string (this);
1209     s.writeUTF (str);
1210  }
1211} // class _DynSequenceStub
1212
Popular Tags