KickJava   Java API By Example, From Geeks To Geeks.

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


1 package org.omg.DynamicAny;
2
3
4 /**
5 * org/omg/DynamicAny/_DynValueStub.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     * DynValue objects support the manipulation of IDL non-boxed value types.
14     * The DynValue interface can represent both null and non-null value types.
15     * For a DynValue representing a non-null value type, the DynValue's components comprise
16     * the public and private members of the value type, including those inherited from concrete base value types,
17     * in the order of definition. A DynValue representing a null value type has no components
18     * and a current position of -1.
19     * <P>Warning: Indiscriminantly changing the contents of private value type members can cause the value type
20     * implementation to break by violating internal constraints. Access to private members is provided to support
21     * such activities as ORB bridging and debugging and should not be used to arbitrarily violate
22     * the encapsulation of the value type.
23     */

24 public class _DynValueStub extends org.omg.CORBA.portable.ObjectImpl JavaDoc implements org.omg.DynamicAny.DynValue JavaDoc
25 {
26   final public static java.lang.Class JavaDoc _opsClass = DynValueOperations JavaDoc.class;
27
28
29
30   /**
31         * Returns the name of the member at the current position.
32         * This operation may return an empty string since the TypeCode of the value being
33         * manipulated may not contain the names of members.
34         *
35         * @exception TypeMismatch if the DynValue represents a null value type.
36         * @exception InvalidValue if the current position does not indicate a member
37         */

38   public String JavaDoc current_member_name () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
39   {
40       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("current_member_name", _opsClass);
41       DynValueOperations JavaDoc $self = (DynValueOperations JavaDoc) $so.servant;
42
43       try {
44          return $self.current_member_name ();
45       } finally {
46           _servant_postinvoke ($so);
47       }
48   } // current_member_name
49

50
51   /**
52         * Returns the TCKind associated with the member at the current position.
53         *
54         * @exception TypeMismatch if the DynValue represents a null value type.
55         * @exception InvalidValue if the current position does not indicate a member
56         */

57   public org.omg.CORBA.TCKind JavaDoc current_member_kind () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
58   {
59       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("current_member_kind", _opsClass);
60       DynValueOperations JavaDoc $self = (DynValueOperations JavaDoc) $so.servant;
61
62       try {
63          return $self.current_member_kind ();
64       } finally {
65           _servant_postinvoke ($so);
66       }
67   } // current_member_kind
68

69
70   /**
71         * Returns a sequence of NameValuePairs describing the name and the value of each member
72         * in the value type.
73         * The sequence contains members in the same order as the declaration order of members
74         * as indicated by the DynValue's TypeCode. The current position is not affected.
75         * The member names in the returned sequence will be empty strings if the DynValue's TypeCode
76         * does not contain member names.
77         *
78         * @exception InvalidValue if this object represents a null value type
79         */

80   public org.omg.DynamicAny.NameValuePair JavaDoc[] get_members () throws org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
81   {
82       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("get_members", _opsClass);
83       DynValueOperations JavaDoc $self = (DynValueOperations JavaDoc) $so.servant;
84
85       try {
86          return $self.get_members ();
87       } finally {
88           _servant_postinvoke ($so);
89       }
90   } // get_members
91

92
93   /**
94         * Initializes the value type's members from a sequence of NameValuePairs.
95         * The operation sets the current position to zero if the passed sequences has non-zero length. Otherwise,
96         * if an empty sequence is passed, the current position is set to -1.
97         * A null value type can be initialized to a non-null value type using this method.
98         * <P>Members must appear in the NameValuePairs in the order in which they appear in the IDL specification
99         * of the value type as indicated by the DynValue's TypeCode or they must be empty strings.
100         * The operation makes no attempt to assign member values based on member names.
101         *
102         * @exception TypeMismatch if the member names supplied in the passed sequence do not match the
103         * corresponding member name in the DynValue's TypeCode and they are not empty strings
104         * @exception InvalidValue if the passed sequence has a number of elements that disagrees
105         * with the number of members as indicated by the DynValue's TypeCode
106         */

107   public void set_members (org.omg.DynamicAny.NameValuePair JavaDoc[] value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
108   {
109       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("set_members", _opsClass);
110       DynValueOperations JavaDoc $self = (DynValueOperations JavaDoc) $so.servant;
111
112       try {
113          $self.set_members (value);
114       } finally {
115           _servant_postinvoke ($so);
116       }
117   } // set_members
118

119
120   /**
121         * Returns a sequence of NameDynAnyPairs describing the name and the value of each member
122         * in the value type.
123         * The sequence contains members in the same order as the declaration order of members
124         * as indicated by the DynValue's TypeCode. The current position is not affected.
125         * The member names in the returned sequence will be empty strings if the DynValue's TypeCode
126         * does not contain member names.
127         *
128         * @exception InvalidValue if this object represents a null value type
129         */

130   public org.omg.DynamicAny.NameDynAnyPair JavaDoc[] get_members_as_dyn_any () throws org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
131   {
132       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("get_members_as_dyn_any", _opsClass);
133       DynValueOperations JavaDoc $self = (DynValueOperations JavaDoc) $so.servant;
134
135       try {
136          return $self.get_members_as_dyn_any ();
137       } finally {
138           _servant_postinvoke ($so);
139       }
140   } // get_members_as_dyn_any
141

142
143   /**
144         * Initializes the value type's members from a sequence of NameDynAnyPairs.
145         * The operation sets the current position to zero if the passed sequences has non-zero length. Otherwise,
146         * if an empty sequence is passed, the current position is set to -1.
147         * A null value type can be initialized to a non-null value type using this method.
148         * <P>Members must appear in the NameDynAnyPairs in the order in which they appear in the IDL specification
149         * of the value type as indicated by the DynValue's TypeCode or they must be empty strings.
150         * The operation makes no attempt to assign member values based on member names.
151         *
152         * @exception TypeMismatch if the member names supplied in the passed sequence do not match the
153         * corresponding member name in the DynValue's TypeCode and they are not empty strings
154         * @exception InvalidValue if the passed sequence has a number of elements that disagrees
155         * with the number of members as indicated by the DynValue's TypeCode
156         */

157   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
158   {
159       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("set_members_as_dyn_any", _opsClass);
160       DynValueOperations JavaDoc $self = (DynValueOperations JavaDoc) $so.servant;
161
162       try {
163          $self.set_members_as_dyn_any (value);
164       } finally {
165           _servant_postinvoke ($so);
166       }
167   } // set_members_as_dyn_any
168

169
170   /**
171         * Returns true if the DynValueCommon represents a null value type.
172         */

173   public boolean is_null ()
174   {
175       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("is_null", _opsClass);
176       DynValueOperations JavaDoc $self = (DynValueOperations JavaDoc) $so.servant;
177
178       try {
179          return $self.is_null ();
180       } finally {
181           _servant_postinvoke ($so);
182       }
183   } // is_null
184

185
186   /**
187         * Changes the representation of a DynValueCommon to a null value type.
188         */

189   public void set_to_null ()
190   {
191       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("set_to_null", _opsClass);
192       DynValueOperations JavaDoc $self = (DynValueOperations JavaDoc) $so.servant;
193
194       try {
195          $self.set_to_null ();
196       } finally {
197           _servant_postinvoke ($so);
198       }
199   } // set_to_null
200

201
202   /**
203         * Replaces a null value type with a newly constructed value. Its components are initialized
204         * to default values as in DynAnyFactory.create_dyn_any_from_type_code.
205         * If the DynValueCommon represents a non-null value type, then this operation has no effect.
206         */

207   public void set_to_value ()
208   {
209       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("set_to_value", _opsClass);
210       DynValueOperations JavaDoc $self = (DynValueOperations JavaDoc) $so.servant;
211
212       try {
213          $self.set_to_value ();
214       } finally {
215           _servant_postinvoke ($so);
216       }
217   } // set_to_value
218

219
220   /**
221         * Returns the TypeCode associated with this DynAny object.
222         * A DynAny object is created with a TypeCode value assigned to it.
223         * This TypeCode value determines the type of the value handled through the DynAny object.
224         * Note that the TypeCode associated with a DynAny object is initialized at the time the
225         * DynAny is created and cannot be changed during lifetime of the DynAny object.
226         *
227         * @return The TypeCode associated with this DynAny object
228         */

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

241
242   /**
243         * Initializes the value associated with a DynAny object with the value
244         * associated with another DynAny object.
245         * The current position of the target DynAny is set to zero for values that have components
246         * and to -1 for values that do not have components.
247         *
248         * @param dyn_any
249         * @exception TypeMismatch if the type of the passed DynAny is not equivalent to the type of target DynAny
250         */

251   public void assign (org.omg.DynamicAny.DynAny JavaDoc dyn_any) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc
252   {
253       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("assign", _opsClass);
254       DynValueOperations JavaDoc $self = (DynValueOperations JavaDoc) $so.servant;
255
256       try {
257          $self.assign (dyn_any);
258       } finally {
259           _servant_postinvoke ($so);
260       }
261   } // assign
262

263
264   /**
265         * Initializes the value associated with a DynAny object with the value contained in an any.
266         * The current position of the target DynAny is set to zero for values that have components
267         * and to -1 for values that do not have components.
268         *
269         * @exception TypeMismatch if the type of the passed Any is not equivalent to the type of target DynAny
270         * @exception InvalidValue if the passed Any does not contain a legal value (such as a null string)
271         */

272   public void from_any (org.omg.CORBA.Any JavaDoc value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
273   {
274       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("from_any", _opsClass);
275       DynValueOperations JavaDoc $self = (DynValueOperations JavaDoc) $so.servant;
276
277       try {
278          $self.from_any (value);
279       } finally {
280           _servant_postinvoke ($so);
281       }
282   } // from_any
283

284
285   /**
286         * Creates an any value from a DynAny object.
287         * A copy of the TypeCode associated with the DynAny object is assigned to the resulting any.
288         * The value associated with the DynAny object is copied into the any.
289         *
290         * @return a new Any object with the same value and TypeCode
291         */

292   public org.omg.CORBA.Any JavaDoc to_any ()
293   {
294       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("to_any", _opsClass);
295       DynValueOperations JavaDoc $self = (DynValueOperations JavaDoc) $so.servant;
296
297       try {
298          return $self.to_any ();
299       } finally {
300           _servant_postinvoke ($so);
301       }
302   } // to_any
303

304
305   /**
306         * Compares two DynAny values for equality.
307         * Two DynAny values are equal if their TypeCodes are equivalent and, recursively, all component DynAnys
308         * have equal values.
309         * The current position of the two DynAnys being compared has no effect on the result of equal.
310         *
311         * @return true of the DynAnys are equal, false otherwise
312         */

313   public boolean equal (org.omg.DynamicAny.DynAny JavaDoc dyn_any)
314   {
315       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("equal", _opsClass);
316       DynValueOperations JavaDoc $self = (DynValueOperations JavaDoc) $so.servant;
317
318       try {
319          return $self.equal (dyn_any);
320       } finally {
321           _servant_postinvoke ($so);
322       }
323   } // equal
324

325
326   /**
327         * Destroys a DynAny object.
328         * This operation frees any resources used to represent the data value associated with a DynAny object.
329         * It must be invoked on references obtained from one of the creation operations on the ORB interface
330         * or on a reference returned by DynAny.copy() to avoid resource leaks.
331         * Invoking destroy on component DynAny objects (for example, on objects returned by the
332         * current_component operation) does nothing.
333         * Destruction of a DynAny object implies destruction of all DynAny objects obtained from it.
334         * That is, references to components of a destroyed DynAny become invalid.
335         * Invocations on such references raise OBJECT_NOT_EXIST.
336         * It is possible to manipulate a component of a DynAny beyond the life time of the DynAny
337         * from which the component was obtained by making a copy of the component with the copy operation
338         * before destroying the DynAny from which the component was obtained.
339         */

340   public void destroy ()
341   {
342       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("destroy", _opsClass);
343       DynValueOperations JavaDoc $self = (DynValueOperations JavaDoc) $so.servant;
344
345       try {
346          $self.destroy ();
347       } finally {
348           _servant_postinvoke ($so);
349       }
350   } // destroy
351

352
353   /**
354         * Creates a new DynAny object whose value is a deep copy of the DynAny on which it is invoked.
355         * The operation is polymorphic, that is, invoking it on one of the types derived from DynAny,
356         * such as DynStruct, creates the derived type but returns its reference as the DynAny base type.
357         *
358         * @return a deep copy of the DynAny object
359         */

360   public org.omg.DynamicAny.DynAny JavaDoc copy ()
361   {
362       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("copy", _opsClass);
363       DynValueOperations JavaDoc $self = (DynValueOperations JavaDoc) $so.servant;
364
365       try {
366          return $self.copy ();
367       } finally {
368           _servant_postinvoke ($so);
369       }
370   } // copy
371

372
373   /**
374         * Inserts a boolean value into the DynAny.
375         *
376         * @exception InvalidValue if this DynAny has components but has a current position of -1
377         * @exception TypeMismatch if called on a DynAny whose current component itself has components
378         */

379   public void insert_boolean (boolean value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
380   {
381       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("insert_boolean", _opsClass);
382       DynValueOperations JavaDoc $self = (DynValueOperations JavaDoc) $so.servant;
383
384       try {
385          $self.insert_boolean (value);
386       } finally {
387           _servant_postinvoke ($so);
388       }
389   } // insert_boolean
390

391
392   /**
393         * Inserts a byte value into the DynAny. The IDL octet data type is mapped to the Java byte data type.
394         *
395         * @exception InvalidValue if this DynAny has components but has a current position of -1
396         * @exception TypeMismatch if called on a DynAny whose current component itself has components
397         */

398   public void insert_octet (byte value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
399   {
400       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("insert_octet", _opsClass);
401       DynValueOperations JavaDoc $self = (DynValueOperations JavaDoc) $so.servant;
402
403       try {
404          $self.insert_octet (value);
405       } finally {
406           _servant_postinvoke ($so);
407       }
408   } // insert_octet
409

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

417   public void insert_char (char value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
418   {
419       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("insert_char", _opsClass);
420       DynValueOperations JavaDoc $self = (DynValueOperations JavaDoc) $so.servant;
421
422       try {
423          $self.insert_char (value);
424       } finally {
425           _servant_postinvoke ($so);
426       }
427   } // insert_char
428

429
430   /**
431         * Inserts a short value into the DynAny.
432         *
433         * @exception InvalidValue if this DynAny has components but has a current position of -1
434         * @exception TypeMismatch if called on a DynAny whose current component itself has components
435         */

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

448
449   /**
450         * Inserts a short value into the DynAny. The IDL ushort data type is mapped to the Java short data type.
451         *
452         * @exception InvalidValue if this DynAny has components but has a current position of -1
453         * @exception TypeMismatch if called on a DynAny whose current component itself has components
454         */

455   public void insert_ushort (short value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
456   {
457       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("insert_ushort", _opsClass);
458       DynValueOperations JavaDoc $self = (DynValueOperations JavaDoc) $so.servant;
459
460       try {
461          $self.insert_ushort (value);
462       } finally {
463           _servant_postinvoke ($so);
464       }
465   } // insert_ushort
466

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

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

486
487   /**
488         * Inserts an integer value into the DynAny. The IDL ulong data type is mapped to the Java int data type.
489         *
490         * @exception InvalidValue if this DynAny has components but has a current position of -1
491         * @exception TypeMismatch if called on a DynAny whose current component itself has components
492         */

493   public void insert_ulong (int value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
494   {
495       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("insert_ulong", _opsClass);
496       DynValueOperations JavaDoc $self = (DynValueOperations JavaDoc) $so.servant;
497
498       try {
499          $self.insert_ulong (value);
500       } finally {
501           _servant_postinvoke ($so);
502       }
503   } // insert_ulong
504

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

512   public void insert_float (float value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
513   {
514       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("insert_float", _opsClass);
515       DynValueOperations JavaDoc $self = (DynValueOperations JavaDoc) $so.servant;
516
517       try {
518          $self.insert_float (value);
519       } finally {
520           _servant_postinvoke ($so);
521       }
522   } // insert_float
523

524
525   /**
526         * Inserts a double value into the DynAny.
527         *
528         * @exception InvalidValue if this DynAny has components but has a current position of -1
529         * @exception TypeMismatch if called on a DynAny whose current component itself has components
530         */

531   public void insert_double (double value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
532   {
533       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("insert_double", _opsClass);
534       DynValueOperations JavaDoc $self = (DynValueOperations JavaDoc) $so.servant;
535
536       try {
537          $self.insert_double (value);
538       } finally {
539           _servant_postinvoke ($so);
540       }
541   } // insert_double
542

543
544   /**
545         * Inserts a string value into the DynAny.
546         * Both bounded and unbounded strings are inserted using this method.
547         *
548         * @exception InvalidValue if this DynAny has components but has a current position of -1
549         * @exception InvalidValue if the string inserted is longer than the bound of a bounded string
550         * @exception TypeMismatch if called on a DynAny whose current component itself has components
551         */

552   public void insert_string (String JavaDoc value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
553   {
554       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("insert_string", _opsClass);
555       DynValueOperations JavaDoc $self = (DynValueOperations JavaDoc) $so.servant;
556
557       try {
558          $self.insert_string (value);
559       } finally {
560           _servant_postinvoke ($so);
561       }
562   } // insert_string
563

564
565   /**
566         * Inserts a reference to a CORBA object into the DynAny.
567         *
568         * @exception InvalidValue if this DynAny has components but has a current position of -1
569         * @exception TypeMismatch if called on a DynAny whose current component itself has components
570         */

571   public void insert_reference (org.omg.CORBA.Object JavaDoc value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
572   {
573       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("insert_reference", _opsClass);
574       DynValueOperations JavaDoc $self = (DynValueOperations JavaDoc) $so.servant;
575
576       try {
577          $self.insert_reference (value);
578       } finally {
579           _servant_postinvoke ($so);
580       }
581   } // insert_reference
582

583
584   /**
585         * Inserts a TypeCode object into the DynAny.
586         *
587         * @exception InvalidValue if this DynAny has components but has a current position of -1
588         * @exception TypeMismatch if called on a DynAny whose current component itself has components
589         */

590   public void insert_typecode (org.omg.CORBA.TypeCode JavaDoc value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
591   {
592       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("insert_typecode", _opsClass);
593       DynValueOperations JavaDoc $self = (DynValueOperations JavaDoc) $so.servant;
594
595       try {
596          $self.insert_typecode (value);
597       } finally {
598           _servant_postinvoke ($so);
599       }
600   } // insert_typecode
601

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

609   public void insert_longlong (long value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
610   {
611       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("insert_longlong", _opsClass);
612       DynValueOperations JavaDoc $self = (DynValueOperations JavaDoc) $so.servant;
613
614       try {
615          $self.insert_longlong (value);
616       } finally {
617           _servant_postinvoke ($so);
618       }
619   } // insert_longlong
620

621
622   /**
623         * Inserts a long value into the DynAny.
624         * The IDL unsigned long long data type is mapped to the Java long data type.
625         *
626         * @exception InvalidValue if this DynAny has components but has a current position of -1
627         * @exception TypeMismatch if called on a DynAny whose current component itself has components
628         */

629   public void insert_ulonglong (long value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
630   {
631       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("insert_ulonglong", _opsClass);
632       DynValueOperations JavaDoc $self = (DynValueOperations JavaDoc) $so.servant;
633
634       try {
635          $self.insert_ulonglong (value);
636       } finally {
637           _servant_postinvoke ($so);
638       }
639   } // insert_ulonglong
640

641
642   /**
643         * Inserts a char value into the DynAny. The IDL wchar data type is mapped to the Java char data type.
644         *
645         * @exception InvalidValue if this DynAny has components but has a current position of -1
646         * @exception TypeMismatch if called on a DynAny whose current component itself has components
647         */

648   public void insert_wchar (char value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
649   {
650       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("insert_wchar", _opsClass);
651       DynValueOperations JavaDoc $self = (DynValueOperations JavaDoc) $so.servant;
652
653       try {
654          $self.insert_wchar (value);
655       } finally {
656           _servant_postinvoke ($so);
657       }
658   } // insert_wchar
659

660
661   /**
662         * Inserts a string value into the DynAny.
663         * Both bounded and unbounded strings are inserted using this method.
664         *
665         * @exception InvalidValue if this DynAny has components but has a current position of -1
666         * @exception InvalidValue if the string inserted is longer than the bound of a bounded string
667         */

668   public void insert_wstring (String JavaDoc value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
669   {
670       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("insert_wstring", _opsClass);
671       DynValueOperations JavaDoc $self = (DynValueOperations JavaDoc) $so.servant;
672
673       try {
674          $self.insert_wstring (value);
675       } finally {
676           _servant_postinvoke ($so);
677       }
678   } // insert_wstring
679

680
681   /**
682         * Inserts an Any value into the Any represented by this DynAny.
683         *
684         * @exception InvalidValue if this DynAny has components but has a current position of -1
685         * @exception TypeMismatch if called on a DynAny whose current component itself has components
686         */

687   public void insert_any (org.omg.CORBA.Any JavaDoc value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
688   {
689       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("insert_any", _opsClass);
690       DynValueOperations JavaDoc $self = (DynValueOperations JavaDoc) $so.servant;
691
692       try {
693          $self.insert_any (value);
694       } finally {
695           _servant_postinvoke ($so);
696       }
697   } // insert_any
698

699
700   /**
701         * Inserts the Any value contained in the parameter DynAny into the Any represented by this DynAny.
702         *
703         * @exception InvalidValue if this DynAny has components but has a current position of -1
704         * @exception TypeMismatch if called on a DynAny whose current component itself has components
705         */

706   public void insert_dyn_any (org.omg.DynamicAny.DynAny JavaDoc value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
707   {
708       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("insert_dyn_any", _opsClass);
709       DynValueOperations JavaDoc $self = (DynValueOperations JavaDoc) $so.servant;
710
711       try {
712          $self.insert_dyn_any (value);
713       } finally {
714           _servant_postinvoke ($so);
715       }
716   } // insert_dyn_any
717

718
719   /**
720         * Inserts a reference to a Serializable object into this DynAny.
721         * The IDL ValueBase type is mapped to the Java Serializable type.
722         *
723         * @exception InvalidValue if this DynAny has components but has a current position of -1
724         * @exception TypeMismatch if called on a DynAny whose current component itself has components
725         */

726   public void insert_val (java.io.Serializable JavaDoc value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
727   {
728       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("insert_val", _opsClass);
729       DynValueOperations JavaDoc $self = (DynValueOperations JavaDoc) $so.servant;
730
731       try {
732          $self.insert_val (value);
733       } finally {
734           _servant_postinvoke ($so);
735       }
736   } // insert_val
737

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

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

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

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

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

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

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

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

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

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

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

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

864
865   /**
866         * Extracts the integer value from this DynAny. The IDL ulong data type is mapped to the Java int data type.
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 int get_ulong () 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_ulong", _opsClass);
876       DynValueOperations JavaDoc $self = (DynValueOperations JavaDoc) $so.servant;
877
878       try {
879          return $self.get_ulong ();
880       } finally {
881           _servant_postinvoke ($so);
882       }
883   } // get_ulong
884

885
886   /**
887         * Extracts the float value 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 float get_float () 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_float", _opsClass);
897       DynValueOperations JavaDoc $self = (DynValueOperations JavaDoc) $so.servant;
898
899       try {
900          return $self.get_float ();
901       } finally {
902           _servant_postinvoke ($so);
903       }
904   } // get_float
905

906
907   /**
908         * Extracts the double value 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 double get_double () 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_double", _opsClass);
918       DynValueOperations JavaDoc $self = (DynValueOperations JavaDoc) $so.servant;
919
920       try {
921          return $self.get_double ();
922       } finally {
923           _servant_postinvoke ($so);
924       }
925   } // get_double
926

927
928   /**
929         * Extracts the string value from this DynAny.
930         * Both bounded and unbounded strings are extracted using this method.
931         *
932         * @exception TypeMismatch if the accessed component in the DynAny is of a type
933         * that is not equivalent to the requested type.
934         * @exception TypeMismatch if called on a DynAny whose current component itself has components
935         * @exception InvalidValue if this DynAny has components but has a current position of -1
936         */

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

949
950   /**
951         * Extracts the reference to a CORBA Object from this DynAny.
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 org.omg.CORBA.Object JavaDoc get_reference () 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_reference", _opsClass);
961       DynValueOperations JavaDoc $self = (DynValueOperations JavaDoc) $so.servant;
962
963       try {
964          return $self.get_reference ();
965       } finally {
966           _servant_postinvoke ($so);
967       }
968   } // get_reference
969

970
971   /**
972         * Extracts the TypeCode object from this DynAny.
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 org.omg.CORBA.TypeCode JavaDoc get_typecode () 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_typecode", _opsClass);
982       DynValueOperations JavaDoc $self = (DynValueOperations JavaDoc) $so.servant;
983
984       try {
985          return $self.get_typecode ();
986       } finally {
987           _servant_postinvoke ($so);
988       }
989   } // get_typecode
990

991
992   /**
993         * Extracts the long value from this DynAny. The IDL long long data type is mapped to the Java long data type.
994         *
995         * @exception TypeMismatch if the accessed component in the DynAny is of a type
996         * that is not equivalent to the requested type.
997         * @exception TypeMismatch if called on a DynAny whose current component itself has components
998         * @exception InvalidValue if this DynAny has components but has a current position of -1
999         */

1000  public long get_longlong () 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_longlong", _opsClass);
1003      DynValueOperations JavaDoc $self = (DynValueOperations JavaDoc) $so.servant;
1004
1005      try {
1006         return $self.get_longlong ();
1007      } finally {
1008          _servant_postinvoke ($so);
1009      }
1010  } // get_longlong
1011

1012
1013  /**
1014        * Extracts the long value from this DynAny.
1015        * The IDL unsigned long long data type is mapped to the Java long data type.
1016        *
1017        * @exception TypeMismatch if the accessed component in the DynAny is of a type
1018        * that is not equivalent to the requested type.
1019        * @exception TypeMismatch if called on a DynAny whose current component itself has components
1020        * @exception InvalidValue if this DynAny has components but has a current position of -1
1021        */

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

1034
1035  /**
1036        * Extracts the long value from this DynAny. The IDL wchar data type is mapped to the Java char data type.
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 char get_wchar () 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_wchar", _opsClass);
1046      DynValueOperations JavaDoc $self = (DynValueOperations JavaDoc) $so.servant;
1047
1048      try {
1049         return $self.get_wchar ();
1050      } finally {
1051          _servant_postinvoke ($so);
1052      }
1053  } // get_wchar
1054

1055
1056  /**
1057        * Extracts the string value from this DynAny.
1058        * Both bounded and unbounded strings are extracted using this method.
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        */

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

1076
1077  /**
1078        * Extracts an Any value contained in the Any represented by this DynAny.
1079        *
1080        * @exception TypeMismatch if the accessed component in the DynAny is of a type
1081        * that is not equivalent to the requested type.
1082        * @exception TypeMismatch if called on a DynAny whose current component itself has components
1083        * @exception InvalidValue if this DynAny has components but has a current position of -1
1084        */

1085  public org.omg.CORBA.Any JavaDoc get_any () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
1086  {
1087      org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("get_any", _opsClass);
1088      DynValueOperations JavaDoc $self = (DynValueOperations JavaDoc) $so.servant;
1089
1090      try {
1091         return $self.get_any ();
1092      } finally {
1093          _servant_postinvoke ($so);
1094      }
1095  } // get_any
1096

1097
1098  /**
1099        * Extracts the Any value contained in the Any represented by this DynAny and returns it wrapped
1100        * into a new DynAny.
1101        *
1102        * @exception TypeMismatch if the accessed component in the DynAny is of a type
1103        * that is not equivalent to the requested type.
1104        * @exception TypeMismatch if called on a DynAny whose current component itself has components
1105        * @exception InvalidValue if this DynAny has components but has a current position of -1
1106        */

1107  public org.omg.DynamicAny.DynAny JavaDoc get_dyn_any () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
1108  {
1109      org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("get_dyn_any", _opsClass);
1110      DynValueOperations JavaDoc $self = (DynValueOperations JavaDoc) $so.servant;
1111
1112      try {
1113         return $self.get_dyn_any ();
1114      } finally {
1115          _servant_postinvoke ($so);
1116      }
1117  } // get_dyn_any
1118

1119
1120  /**
1121        * Extracts a Serializable object from this DynAny.
1122        * The IDL ValueBase type is mapped to the Java Serializable type.
1123        *
1124        * @exception TypeMismatch if the accessed component in the DynAny is of a type
1125        * that is not equivalent to the requested type.
1126        * @exception TypeMismatch if called on a DynAny whose current component itself has components
1127        * @exception InvalidValue if this DynAny has components but has a current position of -1
1128        */

1129  public java.io.Serializable JavaDoc get_val () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc, org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
1130  {
1131      org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("get_val", _opsClass);
1132      DynValueOperations JavaDoc $self = (DynValueOperations JavaDoc) $so.servant;
1133
1134      try {
1135         return $self.get_val ();
1136      } finally {
1137          _servant_postinvoke ($so);
1138      }
1139  } // get_val
1140

1141
1142  /**
1143        * Sets the current position to index. The current position is indexed 0 to n-1, that is,
1144        * index zero corresponds to the first component. The operation returns true if the resulting
1145        * current position indicates a component of the DynAny and false if index indicates
1146        * a position that does not correspond to a component.
1147        * Calling seek with a negative index is legal. It sets the current position to -1 to indicate
1148        * no component and returns false. Passing a non-negative index value for a DynAny that does not
1149        * have a component at the corresponding position sets the current position to -1 and returns false.
1150        */

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

1163
1164  /**
1165        * Is equivalent to seek(0).
1166        */

1167  public void rewind ()
1168  {
1169      org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("rewind", _opsClass);
1170      DynValueOperations JavaDoc $self = (DynValueOperations JavaDoc) $so.servant;
1171
1172      try {
1173         $self.rewind ();
1174      } finally {
1175          _servant_postinvoke ($so);
1176      }
1177  } // rewind
1178

1179
1180  /**
1181        * Advances the current position to the next component.
1182        * The operation returns true while the resulting current position indicates a component, false otherwise.
1183        * A false return value leaves the current position at -1.
1184        * Invoking next on a DynAny without components leaves the current position at -1 and returns false.
1185        */

1186  public boolean next ()
1187  {
1188      org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("next", _opsClass);
1189      DynValueOperations JavaDoc $self = (DynValueOperations JavaDoc) $so.servant;
1190
1191      try {
1192         return $self.next ();
1193      } finally {
1194          _servant_postinvoke ($so);
1195      }
1196  } // next
1197

1198
1199  /**
1200        * Returns the number of components of a DynAny.
1201        * For a DynAny without components, it returns zero.
1202        * The operation only counts the components at the top level.
1203        * For example, if component_count is invoked on a DynStruct with a single member,
1204        * the return value is 1, irrespective of the type of the member.
1205        * <UL>
1206        * <LI>For sequences, the operation returns the current number of elements.
1207        * <LI>For structures, exceptions, and value types, the operation returns the number of members.
1208        * <LI>For arrays, the operation returns the number of elements.
1209        * <LI>For unions, the operation returns 2 if the discriminator indicates that a named member is active,
1210        * otherwise, it returns 1.
1211        * <LI>For DynFixed and DynEnum, the operation returns zero.
1212        * </UL>
1213        */

1214  public int component_count ()
1215  {
1216      org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("component_count", _opsClass);
1217      DynValueOperations JavaDoc $self = (DynValueOperations JavaDoc) $so.servant;
1218
1219      try {
1220         return $self.component_count ();
1221      } finally {
1222          _servant_postinvoke ($so);
1223      }
1224  } // component_count
1225

1226
1227  /**
1228        * Returns the DynAny for the component at the current position.
1229        * It does not advance the current position, so repeated calls to current_component
1230        * without an intervening call to rewind, next, or seek return the same component.
1231        * The returned DynAny object reference can be used to get/set the value of the current component.
1232        * If the current component represents a complex type, the returned reference can be narrowed
1233        * based on the TypeCode to get the interface corresponding to the to the complex type.
1234        * Calling current_component on a DynAny that cannot have components,
1235        * such as a DynEnum or an empty exception, raises TypeMismatch.
1236        * Calling current_component on a DynAny whose current position is -1 returns a nil reference.
1237        * The iteration operations, together with current_component, can be used
1238        * to dynamically compose an any value. After creating a dynamic any, such as a DynStruct,
1239        * current_component and next can be used to initialize all the components of the value.
1240        * Once the dynamic value is completely initialized, to_any creates the corresponding any value.
1241        *
1242        * @exception TypeMismatch If called on a DynAny that cannot have components,
1243        * such as a DynEnum or an empty exception
1244        */

1245  public org.omg.DynamicAny.DynAny JavaDoc current_component () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc
1246  {
1247      org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("current_component", _opsClass);
1248      DynValueOperations JavaDoc $self = (DynValueOperations JavaDoc) $so.servant;
1249
1250      try {
1251         return $self.current_component ();
1252      } finally {
1253          _servant_postinvoke ($so);
1254      }
1255  } // current_component
1256

1257  // Type-specific CORBA::Object operations
1258
private static String JavaDoc[] __ids = {
1259    "IDL:omg.org/DynamicAny/DynValue:1.0",
1260    "IDL:omg.org/DynamicAny/DynValueCommon:1.0",
1261    "IDL:omg.org/DynamicAny/DynAny:1.0"};
1262
1263  public String JavaDoc[] _ids ()
1264  {
1265    return (String JavaDoc[])__ids.clone ();
1266  }
1267
1268  private void readObject (java.io.ObjectInputStream JavaDoc s) throws java.io.IOException JavaDoc
1269  {
1270     String JavaDoc str = s.readUTF ();
1271     String JavaDoc[] args = null;
1272     java.util.Properties JavaDoc props = null;
1273     org.omg.CORBA.Object JavaDoc obj = org.omg.CORBA.ORB.init (args, props).string_to_object (str);
1274     org.omg.CORBA.portable.Delegate JavaDoc delegate = ((org.omg.CORBA.portable.ObjectImpl JavaDoc) obj)._get_delegate ();
1275     _set_delegate (delegate);
1276  }
1277
1278  private void writeObject (java.io.ObjectOutputStream JavaDoc s) throws java.io.IOException JavaDoc
1279  {
1280     String JavaDoc[] args = null;
1281     java.util.Properties JavaDoc props = null;
1282     String JavaDoc str = org.omg.CORBA.ORB.init (args, props).object_to_string (this);
1283     s.writeUTF (str);
1284  }
1285} // class _DynValueStub
1286
Popular Tags