KickJava   Java API By Example, From Geeks To Geeks.

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


1 package org.omg.DynamicAny;
2
3
4 /**
5 * org/omg/DynamicAny/_DynStructStub.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     * DynStruct objects support the manipulation of IDL struct and exception values.
14     * Members of the exceptions are handled in the same way as members of a struct.
15     */

16 public class _DynStructStub extends org.omg.CORBA.portable.ObjectImpl JavaDoc implements org.omg.DynamicAny.DynStruct JavaDoc
17 {
18   final public static java.lang.Class JavaDoc _opsClass = DynStructOperations JavaDoc.class;
19
20
21
22   /**
23         * Returns the name of the member at the current position.
24         * This operation may return an empty string since the TypeCode of the value being
25         * manipulated may not contain the names of members.
26         *
27         * @exception TypeMismatch if the DynStruct represents an empty exception.
28         * @exception InvalidValue if the current position does not indicate a member
29         */

30   public String JavaDoc current_member_name () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
31   {
32       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("current_member_name", _opsClass);
33       DynStructOperations JavaDoc $self = (DynStructOperations JavaDoc) $so.servant;
34
35       try {
36          return $self.current_member_name ();
37       } finally {
38           _servant_postinvoke ($so);
39       }
40   } // current_member_name
41

42
43   /**
44         * Returns the TCKind associated with the member at the current position.
45         *
46         * @exception TypeMismatch if the DynStruct represents an empty exception.
47         * @exception InvalidValue if the current position does not indicate a member
48         */

49   public org.omg.CORBA.TCKind JavaDoc current_member_kind () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
50   {
51       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("current_member_kind", _opsClass);
52       DynStructOperations JavaDoc $self = (DynStructOperations JavaDoc) $so.servant;
53
54       try {
55          return $self.current_member_kind ();
56       } finally {
57           _servant_postinvoke ($so);
58       }
59   } // current_member_kind
60

61
62   /**
63         * Returns a sequence of NameValuePairs describing the name and the value of each member
64         * in the struct associated with a DynStruct object.
65         * The sequence contains members in the same order as the declaration order of members
66         * as indicated by the DynStruct's TypeCode. The current position is not affected.
67         * The member names in the returned sequence will be empty strings if the DynStruct's TypeCode
68         * does not contain member names.
69         */

70   public org.omg.DynamicAny.NameValuePair JavaDoc[] get_members ()
71   {
72       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("get_members", _opsClass);
73       DynStructOperations JavaDoc $self = (DynStructOperations JavaDoc) $so.servant;
74
75       try {
76          return $self.get_members ();
77       } finally {
78           _servant_postinvoke ($so);
79       }
80   } // get_members
81

82
83   /**
84         * Initializes the struct data value associated with a DynStruct object from a sequence of NameValuePairs.
85         * The operation sets the current position to zero if the passed sequences has non-zero length. Otherwise,
86         * if an empty sequence is passed, the current position is set to -1.
87         * <P>Members must appear in the NameValuePairs in the order in which they appear in the IDL specification
88         * of the struct as indicated by the DynStruct's TypeCode or they must be empty strings.
89         * The operation makes no attempt to assign member values based on member names.
90         *
91         * @exception TypeMismatch if the member names supplied in the passed sequence do not match the
92         * corresponding member name in the DynStruct's TypeCode and they are not empty strings
93         * @exception InvalidValue if the passed sequence has a number of elements that disagrees
94         * with the number of members as indicated by the DynStruct's TypeCode
95         */

96   public void set_members (org.omg.DynamicAny.NameValuePair 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_members", _opsClass);
99       DynStructOperations JavaDoc $self = (DynStructOperations JavaDoc) $so.servant;
100
101       try {
102          $self.set_members (value);
103       } finally {
104           _servant_postinvoke ($so);
105       }
106   } // set_members
107

108
109   /**
110         * Returns a sequence of NameDynAnyPairs describing the name and the value of each member
111         * in the struct associated with a DynStruct object.
112         * The sequence contains members in the same order as the declaration order of members
113         * as indicated by the DynStruct's TypeCode. The current position is not affected.
114         * The member names in the returned sequence will be empty strings if the DynStruct's TypeCode
115         * does not contain member names.
116         */

117   public org.omg.DynamicAny.NameDynAnyPair JavaDoc[] get_members_as_dyn_any ()
118   {
119       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("get_members_as_dyn_any", _opsClass);
120       DynStructOperations JavaDoc $self = (DynStructOperations JavaDoc) $so.servant;
121
122       try {
123          return $self.get_members_as_dyn_any ();
124       } finally {
125           _servant_postinvoke ($so);
126       }
127   } // get_members_as_dyn_any
128

129
130   /**
131         * Initializes the struct data value associated with a DynStruct object from a sequence of NameDynAnyPairs.
132         * The operation sets the current position to zero if the passed sequences has non-zero length. Otherwise,
133         * if an empty sequence is passed, the current position is set to -1.
134         * <P>Members must appear in the NameDynAnyPairs in the order in which they appear in the IDL specification
135         * of the struct as indicated by the DynStruct's TypeCode or they must be empty strings.
136         * The operation makes no attempt to assign member values based on member names.
137         *
138         * @exception TypeMismatch if the member names supplied in the passed sequence do not match the
139         * corresponding member name in the DynStruct's TypeCode and they are not empty strings
140         * @exception InvalidValue if the passed sequence has a number of elements that disagrees
141         * with the number of members as indicated by the DynStruct's TypeCode
142         */

143   public void set_members_as_dyn_any (org.omg.DynamicAny.NameDynAnyPair JavaDoc[] value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
144   {
145       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("set_members_as_dyn_any", _opsClass);
146       DynStructOperations JavaDoc $self = (DynStructOperations JavaDoc) $so.servant;
147
148       try {
149          $self.set_members_as_dyn_any (value);
150       } finally {
151           _servant_postinvoke ($so);
152       }
153   } // set_members_as_dyn_any
154

155
156   /**
157         * Returns the TypeCode associated with this DynAny object.
158         * A DynAny object is created with a TypeCode value assigned to it.
159         * This TypeCode value determines the type of the value handled through the DynAny object.
160         * Note that the TypeCode associated with a DynAny object is initialized at the time the
161         * DynAny is created and cannot be changed during lifetime of the DynAny object.
162         *
163         * @return The TypeCode associated with this DynAny object
164         */

165   public org.omg.CORBA.TypeCode JavaDoc type ()
166   {
167       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("type", _opsClass);
168       DynStructOperations JavaDoc $self = (DynStructOperations JavaDoc) $so.servant;
169
170       try {
171          return $self.type ();
172       } finally {
173           _servant_postinvoke ($so);
174       }
175   } // type
176

177
178   /**
179         * Initializes the value associated with a DynAny object with the value
180         * associated with another DynAny object.
181         * The current position of the target DynAny is set to zero for values that have components
182         * and to -1 for values that do not have components.
183         *
184         * @param dyn_any
185         * @exception TypeMismatch if the type of the passed DynAny is not equivalent to the type of target DynAny
186         */

187   public void assign (org.omg.DynamicAny.DynAny JavaDoc dyn_any) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc
188   {
189       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("assign", _opsClass);
190       DynStructOperations JavaDoc $self = (DynStructOperations JavaDoc) $so.servant;
191
192       try {
193          $self.assign (dyn_any);
194       } finally {
195           _servant_postinvoke ($so);
196       }
197   } // assign
198

199
200   /**
201         * Initializes the value associated with a DynAny object with the value contained in an any.
202         * The current position of the target DynAny is set to zero for values that have components
203         * and to -1 for values that do not have components.
204         *
205         * @exception TypeMismatch if the type of the passed Any is not equivalent to the type of target DynAny
206         * @exception InvalidValue if the passed Any does not contain a legal value (such as a null string)
207         */

208   public void from_any (org.omg.CORBA.Any JavaDoc value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
209   {
210       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("from_any", _opsClass);
211       DynStructOperations JavaDoc $self = (DynStructOperations JavaDoc) $so.servant;
212
213       try {
214          $self.from_any (value);
215       } finally {
216           _servant_postinvoke ($so);
217       }
218   } // from_any
219

220
221   /**
222         * Creates an any value from a DynAny object.
223         * A copy of the TypeCode associated with the DynAny object is assigned to the resulting any.
224         * The value associated with the DynAny object is copied into the any.
225         *
226         * @return a new Any object with the same value and TypeCode
227         */

228   public org.omg.CORBA.Any JavaDoc to_any ()
229   {
230       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("to_any", _opsClass);
231       DynStructOperations JavaDoc $self = (DynStructOperations JavaDoc) $so.servant;
232
233       try {
234          return $self.to_any ();
235       } finally {
236           _servant_postinvoke ($so);
237       }
238   } // to_any
239

240
241   /**
242         * Compares two DynAny values for equality.
243         * Two DynAny values are equal if their TypeCodes are equivalent and, recursively, all component DynAnys
244         * have equal values.
245         * The current position of the two DynAnys being compared has no effect on the result of equal.
246         *
247         * @return true of the DynAnys are equal, false otherwise
248         */

249   public boolean equal (org.omg.DynamicAny.DynAny JavaDoc dyn_any)
250   {
251       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("equal", _opsClass);
252       DynStructOperations JavaDoc $self = (DynStructOperations JavaDoc) $so.servant;
253
254       try {
255          return $self.equal (dyn_any);
256       } finally {
257           _servant_postinvoke ($so);
258       }
259   } // equal
260

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

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

288
289   /**
290         * Creates a new DynAny object whose value is a deep copy of the DynAny on which it is invoked.
291         * The operation is polymorphic, that is, invoking it on one of the types derived from DynAny,
292         * such as DynStruct, creates the derived type but returns its reference as the DynAny base type.
293         *
294         * @return a deep copy of the DynAny object
295         */

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

308
309   /**
310         * Inserts a boolean value into the DynAny.
311         *
312         * @exception InvalidValue if this DynAny has components but has a current position of -1
313         * @exception TypeMismatch if called on a DynAny whose current component itself has components
314         */

315   public void insert_boolean (boolean value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
316   {
317       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("insert_boolean", _opsClass);
318       DynStructOperations JavaDoc $self = (DynStructOperations JavaDoc) $so.servant;
319
320       try {
321          $self.insert_boolean (value);
322       } finally {
323           _servant_postinvoke ($so);
324       }
325   } // insert_boolean
326

327
328   /**
329         * Inserts a byte value into the DynAny. The IDL octet data type is mapped to the Java byte data type.
330         *
331         * @exception InvalidValue if this DynAny has components but has a current position of -1
332         * @exception TypeMismatch if called on a DynAny whose current component itself has components
333         */

334   public void insert_octet (byte value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
335   {
336       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("insert_octet", _opsClass);
337       DynStructOperations JavaDoc $self = (DynStructOperations JavaDoc) $so.servant;
338
339       try {
340          $self.insert_octet (value);
341       } finally {
342           _servant_postinvoke ($so);
343       }
344   } // insert_octet
345

346
347   /**
348         * Inserts a char value into the DynAny.
349         *
350         * @exception InvalidValue if this DynAny has components but has a current position of -1
351         * @exception TypeMismatch if called on a DynAny whose current component itself has components
352         */

353   public void insert_char (char value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
354   {
355       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("insert_char", _opsClass);
356       DynStructOperations JavaDoc $self = (DynStructOperations JavaDoc) $so.servant;
357
358       try {
359          $self.insert_char (value);
360       } finally {
361           _servant_postinvoke ($so);
362       }
363   } // insert_char
364

365
366   /**
367         * Inserts a short value into the DynAny.
368         *
369         * @exception InvalidValue if this DynAny has components but has a current position of -1
370         * @exception TypeMismatch if called on a DynAny whose current component itself has components
371         */

372   public void insert_short (short value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
373   {
374       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("insert_short", _opsClass);
375       DynStructOperations JavaDoc $self = (DynStructOperations JavaDoc) $so.servant;
376
377       try {
378          $self.insert_short (value);
379       } finally {
380           _servant_postinvoke ($so);
381       }
382   } // insert_short
383

384
385   /**
386         * Inserts a short value into the DynAny. The IDL ushort data type is mapped to the Java short data type.
387         *
388         * @exception InvalidValue if this DynAny has components but has a current position of -1
389         * @exception TypeMismatch if called on a DynAny whose current component itself has components
390         */

391   public void insert_ushort (short value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
392   {
393       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("insert_ushort", _opsClass);
394       DynStructOperations JavaDoc $self = (DynStructOperations JavaDoc) $so.servant;
395
396       try {
397          $self.insert_ushort (value);
398       } finally {
399           _servant_postinvoke ($so);
400       }
401   } // insert_ushort
402

403
404   /**
405         * Inserts an integer value into the DynAny. The IDL long data type is mapped to the Java int data type.
406         *
407         * @exception InvalidValue if this DynAny has components but has a current position of -1
408         * @exception TypeMismatch if called on a DynAny whose current component itself has components
409         */

410   public void insert_long (int value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
411   {
412       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("insert_long", _opsClass);
413       DynStructOperations JavaDoc $self = (DynStructOperations JavaDoc) $so.servant;
414
415       try {
416          $self.insert_long (value);
417       } finally {
418           _servant_postinvoke ($so);
419       }
420   } // insert_long
421

422
423   /**
424         * Inserts an integer value into the DynAny. The IDL ulong data type is mapped to the Java int data type.
425         *
426         * @exception InvalidValue if this DynAny has components but has a current position of -1
427         * @exception TypeMismatch if called on a DynAny whose current component itself has components
428         */

429   public void insert_ulong (int value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
430   {
431       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("insert_ulong", _opsClass);
432       DynStructOperations JavaDoc $self = (DynStructOperations JavaDoc) $so.servant;
433
434       try {
435          $self.insert_ulong (value);
436       } finally {
437           _servant_postinvoke ($so);
438       }
439   } // insert_ulong
440

441
442   /**
443         * Inserts a float value into the DynAny.
444         *
445         * @exception InvalidValue if this DynAny has components but has a current position of -1
446         * @exception TypeMismatch if called on a DynAny whose current component itself has components
447         */

448   public void insert_float (float value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
449   {
450       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("insert_float", _opsClass);
451       DynStructOperations JavaDoc $self = (DynStructOperations JavaDoc) $so.servant;
452
453       try {
454          $self.insert_float (value);
455       } finally {
456           _servant_postinvoke ($so);
457       }
458   } // insert_float
459

460
461   /**
462         * Inserts a double value into the DynAny.
463         *
464         * @exception InvalidValue if this DynAny has components but has a current position of -1
465         * @exception TypeMismatch if called on a DynAny whose current component itself has components
466         */

467   public void insert_double (double value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
468   {
469       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("insert_double", _opsClass);
470       DynStructOperations JavaDoc $self = (DynStructOperations JavaDoc) $so.servant;
471
472       try {
473          $self.insert_double (value);
474       } finally {
475           _servant_postinvoke ($so);
476       }
477   } // insert_double
478

479
480   /**
481         * Inserts a string value into the DynAny.
482         * Both bounded and unbounded strings are inserted using this method.
483         *
484         * @exception InvalidValue if this DynAny has components but has a current position of -1
485         * @exception InvalidValue if the string inserted is longer than the bound of a bounded string
486         * @exception TypeMismatch if called on a DynAny whose current component itself has components
487         */

488   public void insert_string (String JavaDoc value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
489   {
490       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("insert_string", _opsClass);
491       DynStructOperations JavaDoc $self = (DynStructOperations JavaDoc) $so.servant;
492
493       try {
494          $self.insert_string (value);
495       } finally {
496           _servant_postinvoke ($so);
497       }
498   } // insert_string
499

500
501   /**
502         * Inserts a reference to a CORBA object into the DynAny.
503         *
504         * @exception InvalidValue if this DynAny has components but has a current position of -1
505         * @exception TypeMismatch if called on a DynAny whose current component itself has components
506         */

507   public void insert_reference (org.omg.CORBA.Object JavaDoc value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
508   {
509       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("insert_reference", _opsClass);
510       DynStructOperations JavaDoc $self = (DynStructOperations JavaDoc) $so.servant;
511
512       try {
513          $self.insert_reference (value);
514       } finally {
515           _servant_postinvoke ($so);
516       }
517   } // insert_reference
518

519
520   /**
521         * Inserts a TypeCode object into the DynAny.
522         *
523         * @exception InvalidValue if this DynAny has components but has a current position of -1
524         * @exception TypeMismatch if called on a DynAny whose current component itself has components
525         */

526   public void insert_typecode (org.omg.CORBA.TypeCode JavaDoc value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
527   {
528       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("insert_typecode", _opsClass);
529       DynStructOperations JavaDoc $self = (DynStructOperations JavaDoc) $so.servant;
530
531       try {
532          $self.insert_typecode (value);
533       } finally {
534           _servant_postinvoke ($so);
535       }
536   } // insert_typecode
537

538
539   /**
540         * Inserts a long value into the DynAny. The IDL long long data type is mapped to the Java long data type.
541         *
542         * @exception InvalidValue if this DynAny has components but has a current position of -1
543         * @exception TypeMismatch if called on a DynAny whose current component itself has components
544         */

545   public void insert_longlong (long value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
546   {
547       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("insert_longlong", _opsClass);
548       DynStructOperations JavaDoc $self = (DynStructOperations JavaDoc) $so.servant;
549
550       try {
551          $self.insert_longlong (value);
552       } finally {
553           _servant_postinvoke ($so);
554       }
555   } // insert_longlong
556

557
558   /**
559         * Inserts a long value into the DynAny.
560         * The IDL unsigned long long data type is mapped to the Java long data type.
561         *
562         * @exception InvalidValue if this DynAny has components but has a current position of -1
563         * @exception TypeMismatch if called on a DynAny whose current component itself has components
564         */

565   public void insert_ulonglong (long value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
566   {
567       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("insert_ulonglong", _opsClass);
568       DynStructOperations JavaDoc $self = (DynStructOperations JavaDoc) $so.servant;
569
570       try {
571          $self.insert_ulonglong (value);
572       } finally {
573           _servant_postinvoke ($so);
574       }
575   } // insert_ulonglong
576

577
578   /**
579         * Inserts a char value into the DynAny. The IDL wchar data type is mapped to the Java char data type.
580         *
581         * @exception InvalidValue if this DynAny has components but has a current position of -1
582         * @exception TypeMismatch if called on a DynAny whose current component itself has components
583         */

584   public void insert_wchar (char value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
585   {
586       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("insert_wchar", _opsClass);
587       DynStructOperations JavaDoc $self = (DynStructOperations JavaDoc) $so.servant;
588
589       try {
590          $self.insert_wchar (value);
591       } finally {
592           _servant_postinvoke ($so);
593       }
594   } // insert_wchar
595

596
597   /**
598         * Inserts a string value into the DynAny.
599         * Both bounded and unbounded strings are inserted using this method.
600         *
601         * @exception InvalidValue if this DynAny has components but has a current position of -1
602         * @exception InvalidValue if the string inserted is longer than the bound of a bounded string
603         */

604   public void insert_wstring (String JavaDoc value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
605   {
606       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("insert_wstring", _opsClass);
607       DynStructOperations JavaDoc $self = (DynStructOperations JavaDoc) $so.servant;
608
609       try {
610          $self.insert_wstring (value);
611       } finally {
612           _servant_postinvoke ($so);
613       }
614   } // insert_wstring
615

616
617   /**
618         * Inserts an Any value into the Any represented by this DynAny.
619         *
620         * @exception InvalidValue if this DynAny has components but has a current position of -1
621         * @exception TypeMismatch if called on a DynAny whose current component itself has components
622         */

623   public void insert_any (org.omg.CORBA.Any JavaDoc value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
624   {
625       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("insert_any", _opsClass);
626       DynStructOperations JavaDoc $self = (DynStructOperations JavaDoc) $so.servant;
627
628       try {
629          $self.insert_any (value);
630       } finally {
631           _servant_postinvoke ($so);
632       }
633   } // insert_any
634

635
636   /**
637         * Inserts the Any value contained in the parameter DynAny into the Any represented by this DynAny.
638         *
639         * @exception InvalidValue if this DynAny has components but has a current position of -1
640         * @exception TypeMismatch if called on a DynAny whose current component itself has components
641         */

642   public void insert_dyn_any (org.omg.DynamicAny.DynAny JavaDoc value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
643   {
644       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("insert_dyn_any", _opsClass);
645       DynStructOperations JavaDoc $self = (DynStructOperations JavaDoc) $so.servant;
646
647       try {
648          $self.insert_dyn_any (value);
649       } finally {
650           _servant_postinvoke ($so);
651       }
652   } // insert_dyn_any
653

654
655   /**
656         * Inserts a reference to a Serializable object into this DynAny.
657         * The IDL ValueBase type is mapped to the Java Serializable type.
658         *
659         * @exception InvalidValue if this DynAny has components but has a current position of -1
660         * @exception TypeMismatch if called on a DynAny whose current component itself has components
661         */

662   public void insert_val (java.io.Serializable JavaDoc value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
663   {
664       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("insert_val", _opsClass);
665       DynStructOperations JavaDoc $self = (DynStructOperations JavaDoc) $so.servant;
666
667       try {
668          $self.insert_val (value);
669       } finally {
670           _servant_postinvoke ($so);
671       }
672   } // insert_val
673

674
675   /**
676         * Extracts the boolean value from this DynAny.
677         *
678         * @exception TypeMismatch if the accessed component in the DynAny is of a type
679         * that is not equivalent to the requested type.
680         * @exception TypeMismatch if called on a DynAny whose current component itself has components
681         * @exception InvalidValue if this DynAny has components but has a current position of -1
682         */

683   public boolean get_boolean () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
684   {
685       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("get_boolean", _opsClass);
686       DynStructOperations JavaDoc $self = (DynStructOperations JavaDoc) $so.servant;
687
688       try {
689          return $self.get_boolean ();
690       } finally {
691           _servant_postinvoke ($so);
692       }
693   } // get_boolean
694

695
696   /**
697         * Extracts the byte value from this DynAny. The IDL octet data type is mapped to the Java byte data type.
698         *
699         * @exception TypeMismatch if the accessed component in the DynAny is of a type
700         * that is not equivalent to the requested type.
701         * @exception TypeMismatch if called on a DynAny whose current component itself has components
702         * @exception InvalidValue if this DynAny has components but has a current position of -1
703         */

704   public byte get_octet () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
705   {
706       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("get_octet", _opsClass);
707       DynStructOperations JavaDoc $self = (DynStructOperations JavaDoc) $so.servant;
708
709       try {
710          return $self.get_octet ();
711       } finally {
712           _servant_postinvoke ($so);
713       }
714   } // get_octet
715

716
717   /**
718         * Extracts the char value from this DynAny.
719         *
720         * @exception TypeMismatch if the accessed component in the DynAny is of a type
721         * that is not equivalent to the requested type.
722         * @exception TypeMismatch if called on a DynAny whose current component itself has components
723         * @exception InvalidValue if this DynAny has components but has a current position of -1
724         */

725   public char get_char () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
726   {
727       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("get_char", _opsClass);
728       DynStructOperations JavaDoc $self = (DynStructOperations JavaDoc) $so.servant;
729
730       try {
731          return $self.get_char ();
732       } finally {
733           _servant_postinvoke ($so);
734       }
735   } // get_char
736

737
738   /**
739         * Extracts the short value from this DynAny.
740         *
741         * @exception TypeMismatch if the accessed component in the DynAny is of a type
742         * that is not equivalent to the requested type.
743         * @exception TypeMismatch if called on a DynAny whose current component itself has components
744         * @exception InvalidValue if this DynAny has components but has a current position of -1
745         */

746   public short get_short () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
747   {
748       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("get_short", _opsClass);
749       DynStructOperations JavaDoc $self = (DynStructOperations JavaDoc) $so.servant;
750
751       try {
752          return $self.get_short ();
753       } finally {
754           _servant_postinvoke ($so);
755       }
756   } // get_short
757

758
759   /**
760         * Extracts the short value from this DynAny. The IDL ushort data type is mapped to the Java short data type.
761         *
762         * @exception TypeMismatch if the accessed component in the DynAny is of a type
763         * that is not equivalent to the requested type.
764         * @exception TypeMismatch if called on a DynAny whose current component itself has components
765         * @exception InvalidValue if this DynAny has components but has a current position of -1
766         */

767   public short get_ushort () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
768   {
769       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("get_ushort", _opsClass);
770       DynStructOperations JavaDoc $self = (DynStructOperations JavaDoc) $so.servant;
771
772       try {
773          return $self.get_ushort ();
774       } finally {
775           _servant_postinvoke ($so);
776       }
777   } // get_ushort
778

779
780   /**
781         * Extracts the integer value from this DynAny. The IDL long data type is mapped to the Java int data type.
782         *
783         * @exception TypeMismatch if the accessed component in the DynAny is of a type
784         * that is not equivalent to the requested type.
785         * @exception TypeMismatch if called on a DynAny whose current component itself has components
786         * @exception InvalidValue if this DynAny has components but has a current position of -1
787         */

788   public int get_long () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
789   {
790       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("get_long", _opsClass);
791       DynStructOperations JavaDoc $self = (DynStructOperations JavaDoc) $so.servant;
792
793       try {
794          return $self.get_long ();
795       } finally {
796           _servant_postinvoke ($so);
797       }
798   } // get_long
799

800
801   /**
802         * Extracts the integer value from this DynAny. The IDL ulong data type is mapped to the Java int data type.
803         *
804         * @exception TypeMismatch if the accessed component in the DynAny is of a type
805         * that is not equivalent to the requested type.
806         * @exception TypeMismatch if called on a DynAny whose current component itself has components
807         * @exception InvalidValue if this DynAny has components but has a current position of -1
808         */

809   public int get_ulong () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
810   {
811       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("get_ulong", _opsClass);
812       DynStructOperations JavaDoc $self = (DynStructOperations JavaDoc) $so.servant;
813
814       try {
815          return $self.get_ulong ();
816       } finally {
817           _servant_postinvoke ($so);
818       }
819   } // get_ulong
820

821
822   /**
823         * Extracts the float value from this DynAny.
824         *
825         * @exception TypeMismatch if the accessed component in the DynAny is of a type
826         * that is not equivalent to the requested type.
827         * @exception TypeMismatch if called on a DynAny whose current component itself has components
828         * @exception InvalidValue if this DynAny has components but has a current position of -1
829         */

830   public float get_float () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
831   {
832       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("get_float", _opsClass);
833       DynStructOperations JavaDoc $self = (DynStructOperations JavaDoc) $so.servant;
834
835       try {
836          return $self.get_float ();
837       } finally {
838           _servant_postinvoke ($so);
839       }
840   } // get_float
841

842
843   /**
844         * Extracts the double value from this DynAny.
845         *
846         * @exception TypeMismatch if the accessed component in the DynAny is of a type
847         * that is not equivalent to the requested type.
848         * @exception TypeMismatch if called on a DynAny whose current component itself has components
849         * @exception InvalidValue if this DynAny has components but has a current position of -1
850         */

851   public double get_double () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
852   {
853       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("get_double", _opsClass);
854       DynStructOperations JavaDoc $self = (DynStructOperations JavaDoc) $so.servant;
855
856       try {
857          return $self.get_double ();
858       } finally {
859           _servant_postinvoke ($so);
860       }
861   } // get_double
862

863
864   /**
865         * Extracts the string value from this DynAny.
866         * Both bounded and unbounded strings are extracted using this method.
867         *
868         * @exception TypeMismatch if the accessed component in the DynAny is of a type
869         * that is not equivalent to the requested type.
870         * @exception TypeMismatch if called on a DynAny whose current component itself has components
871         * @exception InvalidValue if this DynAny has components but has a current position of -1
872         */

873   public String JavaDoc get_string () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
874   {
875       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("get_string", _opsClass);
876       DynStructOperations JavaDoc $self = (DynStructOperations JavaDoc) $so.servant;
877
878       try {
879          return $self.get_string ();
880       } finally {
881           _servant_postinvoke ($so);
882       }
883   } // get_string
884

885
886   /**
887         * Extracts the reference to a CORBA Object from this DynAny.
888         *
889         * @exception TypeMismatch if the accessed component in the DynAny is of a type
890         * that is not equivalent to the requested type.
891         * @exception TypeMismatch if called on a DynAny whose current component itself has components
892         * @exception InvalidValue if this DynAny has components but has a current position of -1
893         */

894   public org.omg.CORBA.Object JavaDoc get_reference () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
895   {
896       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("get_reference", _opsClass);
897       DynStructOperations JavaDoc $self = (DynStructOperations JavaDoc) $so.servant;
898
899       try {
900          return $self.get_reference ();
901       } finally {
902           _servant_postinvoke ($so);
903       }
904   } // get_reference
905

906
907   /**
908         * Extracts the TypeCode object from this DynAny.
909         *
910         * @exception TypeMismatch if the accessed component in the DynAny is of a type
911         * that is not equivalent to the requested type.
912         * @exception TypeMismatch if called on a DynAny whose current component itself has components
913         * @exception InvalidValue if this DynAny has components but has a current position of -1
914         */

915   public org.omg.CORBA.TypeCode JavaDoc get_typecode () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
916   {
917       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("get_typecode", _opsClass);
918       DynStructOperations JavaDoc $self = (DynStructOperations JavaDoc) $so.servant;
919
920       try {
921          return $self.get_typecode ();
922       } finally {
923           _servant_postinvoke ($so);
924       }
925   } // get_typecode
926

927
928   /**
929         * Extracts the long value from this DynAny. The IDL long long data type is mapped to the Java long data type.
930         *
931         * @exception TypeMismatch if the accessed component in the DynAny is of a type
932         * that is not equivalent to the requested type.
933         * @exception TypeMismatch if called on a DynAny whose current component itself has components
934         * @exception InvalidValue if this DynAny has components but has a current position of -1
935         */

936   public long get_longlong () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
937   {
938       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("get_longlong", _opsClass);
939       DynStructOperations JavaDoc $self = (DynStructOperations JavaDoc) $so.servant;
940
941       try {
942          return $self.get_longlong ();
943       } finally {
944           _servant_postinvoke ($so);
945       }
946   } // get_longlong
947

948
949   /**
950         * Extracts the long value from this DynAny.
951         * The IDL unsigned long long data type is mapped to the Java long data type.
952         *
953         * @exception TypeMismatch if the accessed component in the DynAny is of a type
954         * that is not equivalent to the requested type.
955         * @exception TypeMismatch if called on a DynAny whose current component itself has components
956         * @exception InvalidValue if this DynAny has components but has a current position of -1
957         */

958   public long get_ulonglong () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
959   {
960       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("get_ulonglong", _opsClass);
961       DynStructOperations JavaDoc $self = (DynStructOperations JavaDoc) $so.servant;
962
963       try {
964          return $self.get_ulonglong ();
965       } finally {
966           _servant_postinvoke ($so);
967       }
968   } // get_ulonglong
969

970
971   /**
972         * Extracts the long value from this DynAny. The IDL wchar data type is mapped to the Java char data type.
973         *
974         * @exception TypeMismatch if the accessed component in the DynAny is of a type
975         * that is not equivalent to the requested type.
976         * @exception TypeMismatch if called on a DynAny whose current component itself has components
977         * @exception InvalidValue if this DynAny has components but has a current position of -1
978         */

979   public char get_wchar () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
980   {
981       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("get_wchar", _opsClass);
982       DynStructOperations JavaDoc $self = (DynStructOperations JavaDoc) $so.servant;
983
984       try {
985          return $self.get_wchar ();
986       } finally {
987           _servant_postinvoke ($so);
988       }
989   } // get_wchar
990

991
992   /**
993         * Extracts the string value from this DynAny.
994         * Both bounded and unbounded strings are extracted using this method.
995         *
996         * @exception TypeMismatch if the accessed component in the DynAny is of a type
997         * that is not equivalent to the requested type.
998         * @exception TypeMismatch if called on a DynAny whose current component itself has components
999         */

1000  public String JavaDoc get_wstring () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
1001  {
1002      org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("get_wstring", _opsClass);
1003      DynStructOperations JavaDoc $self = (DynStructOperations JavaDoc) $so.servant;
1004
1005      try {
1006         return $self.get_wstring ();
1007      } finally {
1008          _servant_postinvoke ($so);
1009      }
1010  } // get_wstring
1011

1012
1013  /**
1014        * Extracts an Any value contained in the Any represented by this DynAny.
1015        *
1016        * @exception TypeMismatch if the accessed component in the DynAny is of a type
1017        * that is not equivalent to the requested type.
1018        * @exception TypeMismatch if called on a DynAny whose current component itself has components
1019        * @exception InvalidValue if this DynAny has components but has a current position of -1
1020        */

1021  public org.omg.CORBA.Any JavaDoc get_any () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
1022  {
1023      org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("get_any", _opsClass);
1024      DynStructOperations JavaDoc $self = (DynStructOperations JavaDoc) $so.servant;
1025
1026      try {
1027         return $self.get_any ();
1028      } finally {
1029          _servant_postinvoke ($so);
1030      }
1031  } // get_any
1032

1033
1034  /**
1035        * Extracts the Any value contained in the Any represented by this DynAny and returns it wrapped
1036        * into a new DynAny.
1037        *
1038        * @exception TypeMismatch if the accessed component in the DynAny is of a type
1039        * that is not equivalent to the requested type.
1040        * @exception TypeMismatch if called on a DynAny whose current component itself has components
1041        * @exception InvalidValue if this DynAny has components but has a current position of -1
1042        */

1043  public org.omg.DynamicAny.DynAny JavaDoc get_dyn_any () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
1044  {
1045      org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("get_dyn_any", _opsClass);
1046      DynStructOperations JavaDoc $self = (DynStructOperations JavaDoc) $so.servant;
1047
1048      try {
1049         return $self.get_dyn_any ();
1050      } finally {
1051          _servant_postinvoke ($so);
1052      }
1053  } // get_dyn_any
1054

1055
1056  /**
1057        * Extracts a Serializable object from this DynAny.
1058        * The IDL ValueBase type is mapped to the Java Serializable type.
1059        *
1060        * @exception TypeMismatch if the accessed component in the DynAny is of a type
1061        * that is not equivalent to the requested type.
1062        * @exception TypeMismatch if called on a DynAny whose current component itself has components
1063        * @exception InvalidValue if this DynAny has components but has a current position of -1
1064        */

1065  public java.io.Serializable JavaDoc get_val () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
1066  {
1067      org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("get_val", _opsClass);
1068      DynStructOperations JavaDoc $self = (DynStructOperations JavaDoc) $so.servant;
1069
1070      try {
1071         return $self.get_val ();
1072      } finally {
1073          _servant_postinvoke ($so);
1074      }
1075  } // get_val
1076

1077
1078  /**
1079        * Sets the current position to index. The current position is indexed 0 to n-1, that is,
1080        * index zero corresponds to the first component. The operation returns true if the resulting
1081        * current position indicates a component of the DynAny and false if index indicates
1082        * a position that does not correspond to a component.
1083        * Calling seek with a negative index is legal. It sets the current position to -1 to indicate
1084        * no component and returns false. Passing a non-negative index value for a DynAny that does not
1085        * have a component at the corresponding position sets the current position to -1 and returns false.
1086        */

1087  public boolean seek (int index)
1088  {
1089      org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("seek", _opsClass);
1090      DynStructOperations JavaDoc $self = (DynStructOperations JavaDoc) $so.servant;
1091
1092      try {
1093         return $self.seek (index);
1094      } finally {
1095          _servant_postinvoke ($so);
1096      }
1097  } // seek
1098

1099
1100  /**
1101        * Is equivalent to seek(0).
1102        */

1103  public void rewind ()
1104  {
1105      org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("rewind", _opsClass);
1106      DynStructOperations JavaDoc $self = (DynStructOperations JavaDoc) $so.servant;
1107
1108      try {
1109         $self.rewind ();
1110      } finally {
1111          _servant_postinvoke ($so);
1112      }
1113  } // rewind
1114

1115
1116  /**
1117        * Advances the current position to the next component.
1118        * The operation returns true while the resulting current position indicates a component, false otherwise.
1119        * A false return value leaves the current position at -1.
1120        * Invoking next on a DynAny without components leaves the current position at -1 and returns false.
1121        */

1122  public boolean next ()
1123  {
1124      org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("next", _opsClass);
1125      DynStructOperations JavaDoc $self = (DynStructOperations JavaDoc) $so.servant;
1126
1127      try {
1128         return $self.next ();
1129      } finally {
1130          _servant_postinvoke ($so);
1131      }
1132  } // next
1133

1134
1135  /**
1136        * Returns the number of components of a DynAny.
1137        * For a DynAny without components, it returns zero.
1138        * The operation only counts the components at the top level.
1139        * For example, if component_count is invoked on a DynStruct with a single member,
1140        * the return value is 1, irrespective of the type of the member.
1141        * <UL>
1142        * <LI>For sequences, the operation returns the current number of elements.
1143        * <LI>For structures, exceptions, and value types, the operation returns the number of members.
1144        * <LI>For arrays, the operation returns the number of elements.
1145        * <LI>For unions, the operation returns 2 if the discriminator indicates that a named member is active,
1146        * otherwise, it returns 1.
1147        * <LI>For DynFixed and DynEnum, the operation returns zero.
1148        * </UL>
1149        */

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

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

1181  public org.omg.DynamicAny.DynAny JavaDoc current_component () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc
1182  {
1183      org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("current_component", _opsClass);
1184      DynStructOperations JavaDoc $self = (DynStructOperations JavaDoc) $so.servant;
1185
1186      try {
1187         return $self.current_component ();
1188      } finally {
1189          _servant_postinvoke ($so);
1190      }
1191  } // current_component
1192

1193  // Type-specific CORBA::Object operations
1194
private static String JavaDoc[] __ids = {
1195    "IDL:omg.org/DynamicAny/DynStruct:1.0",
1196    "IDL:omg.org/DynamicAny/DynAny:1.0"};
1197
1198  public String JavaDoc[] _ids ()
1199  {
1200    return (String JavaDoc[])__ids.clone ();
1201  }
1202
1203  private void readObject (java.io.ObjectInputStream JavaDoc s) throws java.io.IOException JavaDoc
1204  {
1205     String JavaDoc str = s.readUTF ();
1206     String JavaDoc[] args = null;
1207     java.util.Properties JavaDoc props = null;
1208     org.omg.CORBA.Object JavaDoc obj = org.omg.CORBA.ORB.init (args, props).string_to_object (str);
1209     org.omg.CORBA.portable.Delegate JavaDoc delegate = ((org.omg.CORBA.portable.ObjectImpl JavaDoc) obj)._get_delegate ();
1210     _set_delegate (delegate);
1211  }
1212
1213  private void writeObject (java.io.ObjectOutputStream JavaDoc s) throws java.io.IOException JavaDoc
1214  {
1215     String JavaDoc[] args = null;
1216     java.util.Properties JavaDoc props = null;
1217     String JavaDoc str = org.omg.CORBA.ORB.init (args, props).object_to_string (this);
1218     s.writeUTF (str);
1219  }
1220} // class _DynStructStub
1221
Popular Tags