1. package org.omg.DynamicAny;
  2. /**
  3. * org/omg/DynamicAny/_DynUnionStub.java .
  4. * Generated by the IDL-to-Java compiler (portable), version "3.2"
  5. * from ../../../../src/share/classes/org/omg/DynamicAny/DynamicAny.idl
  6. * Wednesday, September 15, 2004 10:28:49 AM GMT
  7. */
  8. /**
  9. * DynUnion objects support the manipulation of IDL unions.
  10. * A union can have only two valid current positions:
  11. * <UL>
  12. * <LI>zero, which denotes the discriminator
  13. * <LI>one, which denotes the active member
  14. * </UL>
  15. * The component_count value for a union depends on the current discriminator:
  16. * it is 2 for a union whose discriminator indicates a named member, and 1 otherwise.
  17. */
  18. public class _DynUnionStub extends org.omg.CORBA.portable.ObjectImpl implements org.omg.DynamicAny.DynUnion
  19. {
  20. final public static java.lang.Class _opsClass = DynUnionOperations.class;
  21. /**
  22. * Returns the current discriminator value.
  23. */
  24. public org.omg.DynamicAny.DynAny get_discriminator ()
  25. {
  26. org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke ("get_discriminator", _opsClass);
  27. DynUnionOperations $self = (DynUnionOperations) $so.servant;
  28. try {
  29. return $self.get_discriminator ();
  30. } finally {
  31. _servant_postinvoke ($so);
  32. }
  33. } // get_discriminator
  34. /**
  35. * Sets the discriminator of the DynUnion to the specified value.
  36. * Setting the discriminator to a value that is consistent with the currently active union member
  37. * does not affect the currently active member. Setting the discriminator to a value that is inconsistent
  38. * with the currently active member deactivates the member and activates the member that is consistent
  39. * with the new discriminator value (if there is a member for that value) by initializing the member
  40. * to its default value.
  41. * Setting the discriminator of a union sets the current position to 0 if the discriminator value
  42. * indicates a non-existent union member (has_no_active_member returns true in this case).
  43. * Otherwise, if the discriminator value indicates a named union member, the current position is set to 1
  44. * (has_no_active_member returns false and component_count returns 2 in this case).
  45. *
  46. * @exception TypeMismatch if the TypeCode of the parameter is not equivalent to the TypeCode
  47. * of the union's discriminator
  48. */
  49. public void set_discriminator (org.omg.DynamicAny.DynAny d) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch
  50. {
  51. org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke ("set_discriminator", _opsClass);
  52. DynUnionOperations $self = (DynUnionOperations) $so.servant;
  53. try {
  54. $self.set_discriminator (d);
  55. } finally {
  56. _servant_postinvoke ($so);
  57. }
  58. } // set_discriminator
  59. /**
  60. * Sets the discriminator to a value that is consistent with the value of the default case of a union.
  61. * It sets the current position to zero and causes component_count to return 2.
  62. *
  63. * @exception TypeMismatch if the union does not have an explicit default case
  64. */
  65. public void set_to_default_member () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch
  66. {
  67. org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke ("set_to_default_member", _opsClass);
  68. DynUnionOperations $self = (DynUnionOperations) $so.servant;
  69. try {
  70. $self.set_to_default_member ();
  71. } finally {
  72. _servant_postinvoke ($so);
  73. }
  74. } // set_to_default_member
  75. /**
  76. * Sets the discriminator to a value that does not correspond to any of the unions case labels.
  77. * It sets the current position to zero and causes component_count to return 1.
  78. *
  79. * @exception TypeMismatch if the union has an explicit default case or if it uses the entire range
  80. * of discriminator values for explicit case labels
  81. */
  82. public void set_to_no_active_member () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch
  83. {
  84. org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke ("set_to_no_active_member", _opsClass);
  85. DynUnionOperations $self = (DynUnionOperations) $so.servant;
  86. try {
  87. $self.set_to_no_active_member ();
  88. } finally {
  89. _servant_postinvoke ($so);
  90. }
  91. } // set_to_no_active_member
  92. /**
  93. * Returns true if the union has no active member, that is, the unions value consists solely
  94. * of its discriminator because the discriminator has a value that is not listed as an explicit case label.
  95. * Calling this operation on a union that has a default case returns false.
  96. * Calling this operation on a union that uses the entire range of discriminator values
  97. * for explicit case labels returns false.
  98. */
  99. public boolean has_no_active_member ()
  100. {
  101. org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke ("has_no_active_member", _opsClass);
  102. DynUnionOperations $self = (DynUnionOperations) $so.servant;
  103. try {
  104. return $self.has_no_active_member ();
  105. } finally {
  106. _servant_postinvoke ($so);
  107. }
  108. } // has_no_active_member
  109. /**
  110. * Returns the TCKind value of the discriminators TypeCode.
  111. */
  112. public org.omg.CORBA.TCKind discriminator_kind ()
  113. {
  114. org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke ("discriminator_kind", _opsClass);
  115. DynUnionOperations $self = (DynUnionOperations) $so.servant;
  116. try {
  117. return $self.discriminator_kind ();
  118. } finally {
  119. _servant_postinvoke ($so);
  120. }
  121. } // discriminator_kind
  122. /**
  123. * Returns the TCKind value of the currently active members TypeCode.
  124. *
  125. * @exception InvalidValue if the union does not have a currently active member
  126. */
  127. public org.omg.CORBA.TCKind member_kind () throws org.omg.DynamicAny.DynAnyPackage.InvalidValue
  128. {
  129. org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke ("member_kind", _opsClass);
  130. DynUnionOperations $self = (DynUnionOperations) $so.servant;
  131. try {
  132. return $self.member_kind ();
  133. } finally {
  134. _servant_postinvoke ($so);
  135. }
  136. } // member_kind
  137. /**
  138. * Returns the currently active member. Note that the returned reference remains valid only
  139. * for as long as the currently active member does not change. Using the returned reference
  140. * beyond the life time of the currently active member raises OBJECT_NOT_EXIST.
  141. *
  142. * @exception InvalidValue if the union has no active member
  143. */
  144. public org.omg.DynamicAny.DynAny member () throws org.omg.DynamicAny.DynAnyPackage.InvalidValue
  145. {
  146. org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke ("member", _opsClass);
  147. DynUnionOperations $self = (DynUnionOperations) $so.servant;
  148. try {
  149. return $self.member ();
  150. } finally {
  151. _servant_postinvoke ($so);
  152. }
  153. } // member
  154. /**
  155. * Returns the name of the currently active member. If the unions TypeCode does not contain
  156. * a member name for the currently active member, the operation returns an empty string.
  157. *
  158. * @exception InvalidValue if the union has no active member
  159. */
  160. public String member_name () throws org.omg.DynamicAny.DynAnyPackage.InvalidValue
  161. {
  162. org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke ("member_name", _opsClass);
  163. DynUnionOperations $self = (DynUnionOperations) $so.servant;
  164. try {
  165. return $self.member_name ();
  166. } finally {
  167. _servant_postinvoke ($so);
  168. }
  169. } // member_name
  170. /**
  171. * Returns the TypeCode associated with this DynAny object.
  172. * A DynAny object is created with a TypeCode value assigned to it.
  173. * This TypeCode value determines the type of the value handled through the DynAny object.
  174. * Note that the TypeCode associated with a DynAny object is initialized at the time the
  175. * DynAny is created and cannot be changed during lifetime of the DynAny object.
  176. *
  177. * @return The TypeCode associated with this DynAny object
  178. */
  179. public org.omg.CORBA.TypeCode type ()
  180. {
  181. org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke ("type", _opsClass);
  182. DynUnionOperations $self = (DynUnionOperations) $so.servant;
  183. try {
  184. return $self.type ();
  185. } finally {
  186. _servant_postinvoke ($so);
  187. }
  188. } // type
  189. /**
  190. * Initializes the value associated with a DynAny object with the value
  191. * associated with another DynAny object.
  192. * The current position of the target DynAny is set to zero for values that have components
  193. * and to -1 for values that do not have components.
  194. *
  195. * @param dyn_any
  196. * @exception TypeMismatch if the type of the passed DynAny is not equivalent to the type of target DynAny
  197. */
  198. public void assign (org.omg.DynamicAny.DynAny dyn_any) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch
  199. {
  200. org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke ("assign", _opsClass);
  201. DynUnionOperations $self = (DynUnionOperations) $so.servant;
  202. try {
  203. $self.assign (dyn_any);
  204. } finally {
  205. _servant_postinvoke ($so);
  206. }
  207. } // assign
  208. /**
  209. * Initializes the value associated with a DynAny object with the value contained in an any.
  210. * The current position of the target DynAny is set to zero for values that have components
  211. * and to -1 for values that do not have components.
  212. *
  213. * @exception TypeMismatch if the type of the passed Any is not equivalent to the type of target DynAny
  214. * @exception InvalidValue if the passed Any does not contain a legal value (such as a null string)
  215. */
  216. public void from_any (org.omg.CORBA.Any value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue
  217. {
  218. org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke ("from_any", _opsClass);
  219. DynUnionOperations $self = (DynUnionOperations) $so.servant;
  220. try {
  221. $self.from_any (value);
  222. } finally {
  223. _servant_postinvoke ($so);
  224. }
  225. } // from_any
  226. /**
  227. * Creates an any value from a DynAny object.
  228. * A copy of the TypeCode associated with the DynAny object is assigned to the resulting any.
  229. * The value associated with the DynAny object is copied into the any.
  230. *
  231. * @return a new Any object with the same value and TypeCode
  232. */
  233. public org.omg.CORBA.Any to_any ()
  234. {
  235. org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke ("to_any", _opsClass);
  236. DynUnionOperations $self = (DynUnionOperations) $so.servant;
  237. try {
  238. return $self.to_any ();
  239. } finally {
  240. _servant_postinvoke ($so);
  241. }
  242. } // to_any
  243. /**
  244. * Compares two DynAny values for equality.
  245. * Two DynAny values are equal if their TypeCodes are equivalent and, recursively, all component DynAnys
  246. * have equal values.
  247. * The current position of the two DynAnys being compared has no effect on the result of equal.
  248. *
  249. * @return true of the DynAnys are equal, false otherwise
  250. */
  251. public boolean equal (org.omg.DynamicAny.DynAny dyn_any)
  252. {
  253. org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke ("equal", _opsClass);
  254. DynUnionOperations $self = (DynUnionOperations) $so.servant;
  255. try {
  256. return $self.equal (dyn_any);
  257. } finally {
  258. _servant_postinvoke ($so);
  259. }
  260. } // equal
  261. /**
  262. * Destroys a DynAny object.
  263. * This operation frees any resources used to represent the data value associated with a DynAny object.
  264. * It must be invoked on references obtained from one of the creation operations on the ORB interface
  265. * or on a reference returned by DynAny.copy() to avoid resource leaks.
  266. * Invoking destroy on component DynAny objects (for example, on objects returned by the
  267. * current_component operation) does nothing.
  268. * Destruction of a DynAny object implies destruction of all DynAny objects obtained from it.
  269. * That is, references to components of a destroyed DynAny become invalid.
  270. * Invocations on such references raise OBJECT_NOT_EXIST.
  271. * It is possible to manipulate a component of a DynAny beyond the life time of the DynAny
  272. * from which the component was obtained by making a copy of the component with the copy operation
  273. * before destroying the DynAny from which the component was obtained.
  274. */
  275. public void destroy ()
  276. {
  277. org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke ("destroy", _opsClass);
  278. DynUnionOperations $self = (DynUnionOperations) $so.servant;
  279. try {
  280. $self.destroy ();
  281. } finally {
  282. _servant_postinvoke ($so);
  283. }
  284. } // destroy
  285. /**
  286. * Creates a new DynAny object whose value is a deep copy of the DynAny on which it is invoked.
  287. * The operation is polymorphic, that is, invoking it on one of the types derived from DynAny,
  288. * such as DynStruct, creates the derived type but returns its reference as the DynAny base type.
  289. *
  290. * @return a deep copy of the DynAny object
  291. */
  292. public org.omg.DynamicAny.DynAny copy ()
  293. {
  294. org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke ("copy", _opsClass);
  295. DynUnionOperations $self = (DynUnionOperations) $so.servant;
  296. try {
  297. return $self.copy ();
  298. } finally {
  299. _servant_postinvoke ($so);
  300. }
  301. } // copy
  302. /**
  303. * Inserts a boolean value into the DynAny.
  304. *
  305. * @exception InvalidValue if this DynAny has components but has a current position of -1
  306. * @exception TypeMismatch if called on a DynAny whose current component itself has components
  307. */
  308. public void insert_boolean (boolean value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue
  309. {
  310. org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke ("insert_boolean", _opsClass);
  311. DynUnionOperations $self = (DynUnionOperations) $so.servant;
  312. try {
  313. $self.insert_boolean (value);
  314. } finally {
  315. _servant_postinvoke ($so);
  316. }
  317. } // insert_boolean
  318. /**
  319. * Inserts a byte value into the DynAny. The IDL octet data type is mapped to the Java byte data type.
  320. *
  321. * @exception InvalidValue if this DynAny has components but has a current position of -1
  322. * @exception TypeMismatch if called on a DynAny whose current component itself has components
  323. */
  324. public void insert_octet (byte value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue
  325. {
  326. org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke ("insert_octet", _opsClass);
  327. DynUnionOperations $self = (DynUnionOperations) $so.servant;
  328. try {
  329. $self.insert_octet (value);
  330. } finally {
  331. _servant_postinvoke ($so);
  332. }
  333. } // insert_octet
  334. /**
  335. * Inserts a char value into the DynAny.
  336. *
  337. * @exception InvalidValue if this DynAny has components but has a current position of -1
  338. * @exception TypeMismatch if called on a DynAny whose current component itself has components
  339. */
  340. public void insert_char (char value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue
  341. {
  342. org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke ("insert_char", _opsClass);
  343. DynUnionOperations $self = (DynUnionOperations) $so.servant;
  344. try {
  345. $self.insert_char (value);
  346. } finally {
  347. _servant_postinvoke ($so);
  348. }
  349. } // insert_char
  350. /**
  351. * Inserts a short value into the DynAny.
  352. *
  353. * @exception InvalidValue if this DynAny has components but has a current position of -1
  354. * @exception TypeMismatch if called on a DynAny whose current component itself has components
  355. */
  356. public void insert_short (short value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue
  357. {
  358. org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke ("insert_short", _opsClass);
  359. DynUnionOperations $self = (DynUnionOperations) $so.servant;
  360. try {
  361. $self.insert_short (value);
  362. } finally {
  363. _servant_postinvoke ($so);
  364. }
  365. } // insert_short
  366. /**
  367. * Inserts a short value into the DynAny. The IDL ushort data type is mapped to the Java short data type.
  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_ushort (short value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue
  373. {
  374. org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke ("insert_ushort", _opsClass);
  375. DynUnionOperations $self = (DynUnionOperations) $so.servant;
  376. try {
  377. $self.insert_ushort (value);
  378. } finally {
  379. _servant_postinvoke ($so);
  380. }
  381. } // insert_ushort
  382. /**
  383. * Inserts an integer value into the DynAny. The IDL long data type is mapped to the Java int data type.
  384. *
  385. * @exception InvalidValue if this DynAny has components but has a current position of -1
  386. * @exception TypeMismatch if called on a DynAny whose current component itself has components
  387. */
  388. public void insert_long (int value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue
  389. {
  390. org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke ("insert_long", _opsClass);
  391. DynUnionOperations $self = (DynUnionOperations) $so.servant;
  392. try {
  393. $self.insert_long (value);
  394. } finally {
  395. _servant_postinvoke ($so);
  396. }
  397. } // insert_long
  398. /**
  399. * Inserts an integer value into the DynAny. The IDL ulong data type is mapped to the Java int data type.
  400. *
  401. * @exception InvalidValue if this DynAny has components but has a current position of -1
  402. * @exception TypeMismatch if called on a DynAny whose current component itself has components
  403. */
  404. public void insert_ulong (int value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue
  405. {
  406. org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke ("insert_ulong", _opsClass);
  407. DynUnionOperations $self = (DynUnionOperations) $so.servant;
  408. try {
  409. $self.insert_ulong (value);
  410. } finally {
  411. _servant_postinvoke ($so);
  412. }
  413. } // insert_ulong
  414. /**
  415. * Inserts a float value into the DynAny.
  416. *
  417. * @exception InvalidValue if this DynAny has components but has a current position of -1
  418. * @exception TypeMismatch if called on a DynAny whose current component itself has components
  419. */
  420. public void insert_float (float value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue
  421. {
  422. org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke ("insert_float", _opsClass);
  423. DynUnionOperations $self = (DynUnionOperations) $so.servant;
  424. try {
  425. $self.insert_float (value);
  426. } finally {
  427. _servant_postinvoke ($so);
  428. }
  429. } // insert_float
  430. /**
  431. * Inserts a double 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_double (double value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue
  437. {
  438. org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke ("insert_double", _opsClass);
  439. DynUnionOperations $self = (DynUnionOperations) $so.servant;
  440. try {
  441. $self.insert_double (value);
  442. } finally {
  443. _servant_postinvoke ($so);
  444. }
  445. } // insert_double
  446. /**
  447. * Inserts a string value into the DynAny.
  448. * Both bounded and unbounded strings are inserted using this method.
  449. *
  450. * @exception InvalidValue if this DynAny has components but has a current position of -1
  451. * @exception InvalidValue if the string inserted is longer than the bound of a bounded string
  452. * @exception TypeMismatch if called on a DynAny whose current component itself has components
  453. */
  454. public void insert_string (String value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue
  455. {
  456. org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke ("insert_string", _opsClass);
  457. DynUnionOperations $self = (DynUnionOperations) $so.servant;
  458. try {
  459. $self.insert_string (value);
  460. } finally {
  461. _servant_postinvoke ($so);
  462. }
  463. } // insert_string
  464. /**
  465. * Inserts a reference to a CORBA object into the DynAny.
  466. *
  467. * @exception InvalidValue if this DynAny has components but has a current position of -1
  468. * @exception TypeMismatch if called on a DynAny whose current component itself has components
  469. */
  470. public void insert_reference (org.omg.CORBA.Object value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue
  471. {
  472. org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke ("insert_reference", _opsClass);
  473. DynUnionOperations $self = (DynUnionOperations) $so.servant;
  474. try {
  475. $self.insert_reference (value);
  476. } finally {
  477. _servant_postinvoke ($so);
  478. }
  479. } // insert_reference
  480. /**
  481. * Inserts a TypeCode object into the DynAny.
  482. *
  483. * @exception InvalidValue if this DynAny has components but has a current position of -1
  484. * @exception TypeMismatch if called on a DynAny whose current component itself has components
  485. */
  486. public void insert_typecode (org.omg.CORBA.TypeCode value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue
  487. {
  488. org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke ("insert_typecode", _opsClass);
  489. DynUnionOperations $self = (DynUnionOperations) $so.servant;
  490. try {
  491. $self.insert_typecode (value);
  492. } finally {
  493. _servant_postinvoke ($so);
  494. }
  495. } // insert_typecode
  496. /**
  497. * Inserts a long value into the DynAny. The IDL long long data type is mapped to the Java long data type.
  498. *
  499. * @exception InvalidValue if this DynAny has components but has a current position of -1
  500. * @exception TypeMismatch if called on a DynAny whose current component itself has components
  501. */
  502. public void insert_longlong (long value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue
  503. {
  504. org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke ("insert_longlong", _opsClass);
  505. DynUnionOperations $self = (DynUnionOperations) $so.servant;
  506. try {
  507. $self.insert_longlong (value);
  508. } finally {
  509. _servant_postinvoke ($so);
  510. }
  511. } // insert_longlong
  512. /**
  513. * Inserts a long value into the DynAny.
  514. * The IDL unsigned long long data type is mapped to the Java long data type.
  515. *
  516. * @exception InvalidValue if this DynAny has components but has a current position of -1
  517. * @exception TypeMismatch if called on a DynAny whose current component itself has components
  518. */
  519. public void insert_ulonglong (long value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue
  520. {
  521. org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke ("insert_ulonglong", _opsClass);
  522. DynUnionOperations $self = (DynUnionOperations) $so.servant;
  523. try {
  524. $self.insert_ulonglong (value);
  525. } finally {
  526. _servant_postinvoke ($so);
  527. }
  528. } // insert_ulonglong
  529. /**
  530. * Inserts a char value into the DynAny. The IDL wchar data type is mapped to the Java char data type.
  531. *
  532. * @exception InvalidValue if this DynAny has components but has a current position of -1
  533. * @exception TypeMismatch if called on a DynAny whose current component itself has components
  534. */
  535. public void insert_wchar (char value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue
  536. {
  537. org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke ("insert_wchar", _opsClass);
  538. DynUnionOperations $self = (DynUnionOperations) $so.servant;
  539. try {
  540. $self.insert_wchar (value);
  541. } finally {
  542. _servant_postinvoke ($so);
  543. }
  544. } // insert_wchar
  545. /**
  546. * Inserts a string value into the DynAny.
  547. * Both bounded and unbounded strings are inserted using this method.
  548. *
  549. * @exception InvalidValue if this DynAny has components but has a current position of -1
  550. * @exception InvalidValue if the string inserted is longer than the bound of a bounded string
  551. */
  552. public void insert_wstring (String value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue
  553. {
  554. org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke ("insert_wstring", _opsClass);
  555. DynUnionOperations $self = (DynUnionOperations) $so.servant;
  556. try {
  557. $self.insert_wstring (value);
  558. } finally {
  559. _servant_postinvoke ($so);
  560. }
  561. } // insert_wstring
  562. /**
  563. * Inserts an Any value into the Any represented by this DynAny.
  564. *
  565. * @exception InvalidValue if this DynAny has components but has a current position of -1
  566. * @exception TypeMismatch if called on a DynAny whose current component itself has components
  567. */
  568. public void insert_any (org.omg.CORBA.Any value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue
  569. {
  570. org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke ("insert_any", _opsClass);
  571. DynUnionOperations $self = (DynUnionOperations) $so.servant;
  572. try {
  573. $self.insert_any (value);
  574. } finally {
  575. _servant_postinvoke ($so);
  576. }
  577. } // insert_any
  578. /**
  579. * Inserts the Any value contained in the parameter DynAny into the Any represented by this DynAny.
  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_dyn_any (org.omg.DynamicAny.DynAny value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue
  585. {
  586. org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke ("insert_dyn_any", _opsClass);
  587. DynUnionOperations $self = (DynUnionOperations) $so.servant;
  588. try {
  589. $self.insert_dyn_any (value);
  590. } finally {
  591. _servant_postinvoke ($so);
  592. }
  593. } // insert_dyn_any
  594. /**
  595. * Inserts a reference to a Serializable object into this DynAny.
  596. * The IDL ValueBase type is mapped to the Java Serializable type.
  597. *
  598. * @exception InvalidValue if this DynAny has components but has a current position of -1
  599. * @exception TypeMismatch if called on a DynAny whose current component itself has components
  600. */
  601. public void insert_val (java.io.Serializable value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue
  602. {
  603. org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke ("insert_val", _opsClass);
  604. DynUnionOperations $self = (DynUnionOperations) $so.servant;
  605. try {
  606. $self.insert_val (value);
  607. } finally {
  608. _servant_postinvoke ($so);
  609. }
  610. } // insert_val
  611. /**
  612. * Extracts the boolean value from this DynAny.
  613. *
  614. * @exception TypeMismatch if the accessed component in the DynAny is of a type
  615. * that is not equivalent to the requested type.
  616. * @exception TypeMismatch if called on a DynAny whose current component itself has components
  617. * @exception InvalidValue if this DynAny has components but has a current position of -1
  618. */
  619. public boolean get_boolean () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue
  620. {
  621. org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke ("get_boolean", _opsClass);
  622. DynUnionOperations $self = (DynUnionOperations) $so.servant;
  623. try {
  624. return $self.get_boolean ();
  625. } finally {
  626. _servant_postinvoke ($so);
  627. }
  628. } // get_boolean
  629. /**
  630. * Extracts the byte value from this DynAny. The IDL octet data type is mapped to the Java byte data type.
  631. *
  632. * @exception TypeMismatch if the accessed component in the DynAny is of a type
  633. * that is not equivalent to the requested type.
  634. * @exception TypeMismatch if called on a DynAny whose current component itself has components
  635. * @exception InvalidValue if this DynAny has components but has a current position of -1
  636. */
  637. public byte get_octet () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue
  638. {
  639. org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke ("get_octet", _opsClass);
  640. DynUnionOperations $self = (DynUnionOperations) $so.servant;
  641. try {
  642. return $self.get_octet ();
  643. } finally {
  644. _servant_postinvoke ($so);
  645. }
  646. } // get_octet
  647. /**
  648. * Extracts the char value from this DynAny.
  649. *
  650. * @exception TypeMismatch if the accessed component in the DynAny is of a type
  651. * that is not equivalent to the requested type.
  652. * @exception TypeMismatch if called on a DynAny whose current component itself has components
  653. * @exception InvalidValue if this DynAny has components but has a current position of -1
  654. */
  655. public char get_char () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue
  656. {
  657. org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke ("get_char", _opsClass);
  658. DynUnionOperations $self = (DynUnionOperations) $so.servant;
  659. try {
  660. return $self.get_char ();
  661. } finally {
  662. _servant_postinvoke ($so);
  663. }
  664. } // get_char
  665. /**
  666. * Extracts the short value from this DynAny.
  667. *
  668. * @exception TypeMismatch if the accessed component in the DynAny is of a type
  669. * that is not equivalent to the requested type.
  670. * @exception TypeMismatch if called on a DynAny whose current component itself has components
  671. * @exception InvalidValue if this DynAny has components but has a current position of -1
  672. */
  673. public short get_short () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue
  674. {
  675. org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke ("get_short", _opsClass);
  676. DynUnionOperations $self = (DynUnionOperations) $so.servant;
  677. try {
  678. return $self.get_short ();
  679. } finally {
  680. _servant_postinvoke ($so);
  681. }
  682. } // get_short
  683. /**
  684. * Extracts the short value from this DynAny. The IDL ushort data type is mapped to the Java short data type.
  685. *
  686. * @exception TypeMismatch if the accessed component in the DynAny is of a type
  687. * that is not equivalent to the requested type.
  688. * @exception TypeMismatch if called on a DynAny whose current component itself has components
  689. * @exception InvalidValue if this DynAny has components but has a current position of -1
  690. */
  691. public short get_ushort () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue
  692. {
  693. org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke ("get_ushort", _opsClass);
  694. DynUnionOperations $self = (DynUnionOperations) $so.servant;
  695. try {
  696. return $self.get_ushort ();
  697. } finally {
  698. _servant_postinvoke ($so);
  699. }
  700. } // get_ushort
  701. /**
  702. * Extracts the integer value from this DynAny. The IDL long data type is mapped to the Java int data type.
  703. *
  704. * @exception TypeMismatch if the accessed component in the DynAny is of a type
  705. * that is not equivalent to the requested type.
  706. * @exception TypeMismatch if called on a DynAny whose current component itself has components
  707. * @exception InvalidValue if this DynAny has components but has a current position of -1
  708. */
  709. public int get_long () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue
  710. {
  711. org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke ("get_long", _opsClass);
  712. DynUnionOperations $self = (DynUnionOperations) $so.servant;
  713. try {
  714. return $self.get_long ();
  715. } finally {
  716. _servant_postinvoke ($so);
  717. }
  718. } // get_long
  719. /**
  720. * Extracts the integer value from this DynAny. The IDL ulong data type is mapped to the Java int data type.
  721. *
  722. * @exception TypeMismatch if the accessed component in the DynAny is of a type
  723. * that is not equivalent to the requested type.
  724. * @exception TypeMismatch if called on a DynAny whose current component itself has components
  725. * @exception InvalidValue if this DynAny has components but has a current position of -1
  726. */
  727. public int get_ulong () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue
  728. {
  729. org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke ("get_ulong", _opsClass);
  730. DynUnionOperations $self = (DynUnionOperations) $so.servant;
  731. try {
  732. return $self.get_ulong ();
  733. } finally {
  734. _servant_postinvoke ($so);
  735. }
  736. } // get_ulong
  737. /**
  738. * Extracts the float value from this DynAny.
  739. *
  740. * @exception TypeMismatch if the accessed component in the DynAny is of a type
  741. * that is not equivalent to the requested type.
  742. * @exception TypeMismatch if called on a DynAny whose current component itself has components
  743. * @exception InvalidValue if this DynAny has components but has a current position of -1
  744. */
  745. public float get_float () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue
  746. {
  747. org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke ("get_float", _opsClass);
  748. DynUnionOperations $self = (DynUnionOperations) $so.servant;
  749. try {
  750. return $self.get_float ();
  751. } finally {
  752. _servant_postinvoke ($so);
  753. }
  754. } // get_float
  755. /**
  756. * Extracts the double value from this DynAny.
  757. *
  758. * @exception TypeMismatch if the accessed component in the DynAny is of a type
  759. * that is not equivalent to the requested type.
  760. * @exception TypeMismatch if called on a DynAny whose current component itself has components
  761. * @exception InvalidValue if this DynAny has components but has a current position of -1
  762. */
  763. public double get_double () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue
  764. {
  765. org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke ("get_double", _opsClass);
  766. DynUnionOperations $self = (DynUnionOperations) $so.servant;
  767. try {
  768. return $self.get_double ();
  769. } finally {
  770. _servant_postinvoke ($so);
  771. }
  772. } // get_double
  773. /**
  774. * Extracts the string value from this DynAny.
  775. * Both bounded and unbounded strings are extracted using this method.
  776. *
  777. * @exception TypeMismatch if the accessed component in the DynAny is of a type
  778. * that is not equivalent to the requested type.
  779. * @exception TypeMismatch if called on a DynAny whose current component itself has components
  780. * @exception InvalidValue if this DynAny has components but has a current position of -1
  781. */
  782. public String get_string () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue
  783. {
  784. org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke ("get_string", _opsClass);
  785. DynUnionOperations $self = (DynUnionOperations) $so.servant;
  786. try {
  787. return $self.get_string ();
  788. } finally {
  789. _servant_postinvoke ($so);
  790. }
  791. } // get_string
  792. /**
  793. * Extracts the reference to a CORBA Object from this DynAny.
  794. *
  795. * @exception TypeMismatch if the accessed component in the DynAny is of a type
  796. * that is not equivalent to the requested type.
  797. * @exception TypeMismatch if called on a DynAny whose current component itself has components
  798. * @exception InvalidValue if this DynAny has components but has a current position of -1
  799. */
  800. public org.omg.CORBA.Object get_reference () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue
  801. {
  802. org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke ("get_reference", _opsClass);
  803. DynUnionOperations $self = (DynUnionOperations) $so.servant;
  804. try {
  805. return $self.get_reference ();
  806. } finally {
  807. _servant_postinvoke ($so);
  808. }
  809. } // get_reference
  810. /**
  811. * Extracts the TypeCode object from this DynAny.
  812. *
  813. * @exception TypeMismatch if the accessed component in the DynAny is of a type
  814. * that is not equivalent to the requested type.
  815. * @exception TypeMismatch if called on a DynAny whose current component itself has components
  816. * @exception InvalidValue if this DynAny has components but has a current position of -1
  817. */
  818. public org.omg.CORBA.TypeCode get_typecode () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue
  819. {
  820. org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke ("get_typecode", _opsClass);
  821. DynUnionOperations $self = (DynUnionOperations) $so.servant;
  822. try {
  823. return $self.get_typecode ();
  824. } finally {
  825. _servant_postinvoke ($so);
  826. }
  827. } // get_typecode
  828. /**
  829. * Extracts the long value from this DynAny. The IDL long long data type is mapped to the Java long data type.
  830. *
  831. * @exception TypeMismatch if the accessed component in the DynAny is of a type
  832. * that is not equivalent to the requested type.
  833. * @exception TypeMismatch if called on a DynAny whose current component itself has components
  834. * @exception InvalidValue if this DynAny has components but has a current position of -1
  835. */
  836. public long get_longlong () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue
  837. {
  838. org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke ("get_longlong", _opsClass);
  839. DynUnionOperations $self = (DynUnionOperations) $so.servant;
  840. try {
  841. return $self.get_longlong ();
  842. } finally {
  843. _servant_postinvoke ($so);
  844. }
  845. } // get_longlong
  846. /**
  847. * Extracts the long value from this DynAny.
  848. * The IDL unsigned long long data type is mapped to the Java long data type.
  849. *
  850. * @exception TypeMismatch if the accessed component in the DynAny is of a type
  851. * that is not equivalent to the requested type.
  852. * @exception TypeMismatch if called on a DynAny whose current component itself has components
  853. * @exception InvalidValue if this DynAny has components but has a current position of -1
  854. */
  855. public long get_ulonglong () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue
  856. {
  857. org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke ("get_ulonglong", _opsClass);
  858. DynUnionOperations $self = (DynUnionOperations) $so.servant;
  859. try {
  860. return $self.get_ulonglong ();
  861. } finally {
  862. _servant_postinvoke ($so);
  863. }
  864. } // get_ulonglong
  865. /**
  866. * Extracts the long value from this DynAny. The IDL wchar data type is mapped to the Java char 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 char get_wchar () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue
  874. {
  875. org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke ("get_wchar", _opsClass);
  876. DynUnionOperations $self = (DynUnionOperations) $so.servant;
  877. try {
  878. return $self.get_wchar ();
  879. } finally {
  880. _servant_postinvoke ($so);
  881. }
  882. } // get_wchar
  883. /**
  884. * Extracts the string value from this DynAny.
  885. * Both bounded and unbounded strings are extracted using this method.
  886. *
  887. * @exception TypeMismatch if the accessed component in the DynAny is of a type
  888. * that is not equivalent to the requested type.
  889. * @exception TypeMismatch if called on a DynAny whose current component itself has components
  890. */
  891. public String get_wstring () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue
  892. {
  893. org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke ("get_wstring", _opsClass);
  894. DynUnionOperations $self = (DynUnionOperations) $so.servant;
  895. try {
  896. return $self.get_wstring ();
  897. } finally {
  898. _servant_postinvoke ($so);
  899. }
  900. } // get_wstring
  901. /**
  902. * Extracts an Any value contained in the Any represented by this DynAny.
  903. *
  904. * @exception TypeMismatch if the accessed component in the DynAny is of a type
  905. * that is not equivalent to the requested type.
  906. * @exception TypeMismatch if called on a DynAny whose current component itself has components
  907. * @exception InvalidValue if this DynAny has components but has a current position of -1
  908. */
  909. public org.omg.CORBA.Any get_any () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue
  910. {
  911. org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke ("get_any", _opsClass);
  912. DynUnionOperations $self = (DynUnionOperations) $so.servant;
  913. try {
  914. return $self.get_any ();
  915. } finally {
  916. _servant_postinvoke ($so);
  917. }
  918. } // get_any
  919. /**
  920. * Extracts the Any value contained in the Any represented by this DynAny and returns it wrapped
  921. * into a new DynAny.
  922. *
  923. * @exception TypeMismatch if the accessed component in the DynAny is of a type
  924. * that is not equivalent to the requested type.
  925. * @exception TypeMismatch if called on a DynAny whose current component itself has components
  926. * @exception InvalidValue if this DynAny has components but has a current position of -1
  927. */
  928. public org.omg.DynamicAny.DynAny get_dyn_any () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue
  929. {
  930. org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke ("get_dyn_any", _opsClass);
  931. DynUnionOperations $self = (DynUnionOperations) $so.servant;
  932. try {
  933. return $self.get_dyn_any ();
  934. } finally {
  935. _servant_postinvoke ($so);
  936. }
  937. } // get_dyn_any
  938. /**
  939. * Extracts a Serializable object from this DynAny.
  940. * The IDL ValueBase type is mapped to the Java Serializable type.
  941. *
  942. * @exception TypeMismatch if the accessed component in the DynAny is of a type
  943. * that is not equivalent to the requested type.
  944. * @exception TypeMismatch if called on a DynAny whose current component itself has components
  945. * @exception InvalidValue if this DynAny has components but has a current position of -1
  946. */
  947. public java.io.Serializable get_val () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue
  948. {
  949. org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke ("get_val", _opsClass);
  950. DynUnionOperations $self = (DynUnionOperations) $so.servant;
  951. try {
  952. return $self.get_val ();
  953. } finally {
  954. _servant_postinvoke ($so);
  955. }
  956. } // get_val
  957. /**
  958. * Sets the current position to index. The current position is indexed 0 to n-1, that is,
  959. * index zero corresponds to the first component. The operation returns true if the resulting
  960. * current position indicates a component of the DynAny and false if index indicates
  961. * a position that does not correspond to a component.
  962. * Calling seek with a negative index is legal. It sets the current position to -1 to indicate
  963. * no component and returns false. Passing a non-negative index value for a DynAny that does not
  964. * have a component at the corresponding position sets the current position to -1 and returns false.
  965. */
  966. public boolean seek (int index)
  967. {
  968. org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke ("seek", _opsClass);
  969. DynUnionOperations $self = (DynUnionOperations) $so.servant;
  970. try {
  971. return $self.seek (index);
  972. } finally {
  973. _servant_postinvoke ($so);
  974. }
  975. } // seek
  976. /**
  977. * Is equivalent to seek(0).
  978. */
  979. public void rewind ()
  980. {
  981. org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke ("rewind", _opsClass);
  982. DynUnionOperations $self = (DynUnionOperations) $so.servant;
  983. try {
  984. $self.rewind ();
  985. } finally {
  986. _servant_postinvoke ($so);
  987. }
  988. } // rewind
  989. /**
  990. * Advances the current position to the next component.
  991. * The operation returns true while the resulting current position indicates a component, false otherwise.
  992. * A false return value leaves the current position at -1.
  993. * Invoking next on a DynAny without components leaves the current position at -1 and returns false.
  994. */
  995. public boolean next ()
  996. {
  997. org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke ("next", _opsClass);
  998. DynUnionOperations $self = (DynUnionOperations) $so.servant;
  999. try {
  1000. return $self.next ();
  1001. } finally {
  1002. _servant_postinvoke ($so);
  1003. }
  1004. } // next
  1005. /**
  1006. * Returns the number of components of a DynAny.
  1007. * For a DynAny without components, it returns zero.
  1008. * The operation only counts the components at the top level.
  1009. * For example, if component_count is invoked on a DynStruct with a single member,
  1010. * the return value is 1, irrespective of the type of the member.
  1011. * <UL>
  1012. * <LI>For sequences, the operation returns the current number of elements.
  1013. * <LI>For structures, exceptions, and value types, the operation returns the number of members.
  1014. * <LI>For arrays, the operation returns the number of elements.
  1015. * <LI>For unions, the operation returns 2 if the discriminator indicates that a named member is active,
  1016. * otherwise, it returns 1.
  1017. * <LI>For DynFixed and DynEnum, the operation returns zero.
  1018. * </UL>
  1019. */
  1020. public int component_count ()
  1021. {
  1022. org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke ("component_count", _opsClass);
  1023. DynUnionOperations $self = (DynUnionOperations) $so.servant;
  1024. try {
  1025. return $self.component_count ();
  1026. } finally {
  1027. _servant_postinvoke ($so);
  1028. }
  1029. } // component_count
  1030. /**
  1031. * Returns the DynAny for the component at the current position.
  1032. * It does not advance the current position, so repeated calls to current_component
  1033. * without an intervening call to rewind, next, or seek return the same component.
  1034. * The returned DynAny object reference can be used to get/set the value of the current component.
  1035. * If the current component represents a complex type, the returned reference can be narrowed
  1036. * based on the TypeCode to get the interface corresponding to the to the complex type.
  1037. * Calling current_component on a DynAny that cannot have components,
  1038. * such as a DynEnum or an empty exception, raises TypeMismatch.
  1039. * Calling current_component on a DynAny whose current position is -1 returns a nil reference.
  1040. * The iteration operations, together with current_component, can be used
  1041. * to dynamically compose an any value. After creating a dynamic any, such as a DynStruct,
  1042. * current_component and next can be used to initialize all the components of the value.
  1043. * Once the dynamic value is completely initialized, to_any creates the corresponding any value.
  1044. *
  1045. * @exception TypeMismatch If called on a DynAny that cannot have components,
  1046. * such as a DynEnum or an empty exception
  1047. */
  1048. public org.omg.DynamicAny.DynAny current_component () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch
  1049. {
  1050. org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke ("current_component", _opsClass);
  1051. DynUnionOperations $self = (DynUnionOperations) $so.servant;
  1052. try {
  1053. return $self.current_component ();
  1054. } finally {
  1055. _servant_postinvoke ($so);
  1056. }
  1057. } // current_component
  1058. // Type-specific CORBA::Object operations
  1059. private static String[] __ids = {
  1060. "IDL:omg.org/DynamicAny/DynUnion:1.0",
  1061. "IDL:omg.org/DynamicAny/DynAny:1.0"};
  1062. public String[] _ids ()
  1063. {
  1064. return (String[])__ids.clone ();
  1065. }
  1066. private void readObject (java.io.ObjectInputStream s) throws java.io.IOException
  1067. {
  1068. String str = s.readUTF ();
  1069. String[] args = null;
  1070. java.util.Properties props = null;
  1071. org.omg.CORBA.Object obj = org.omg.CORBA.ORB.init (args, props).string_to_object (str);
  1072. org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl) obj)._get_delegate ();
  1073. _set_delegate (delegate);
  1074. }
  1075. private void writeObject (java.io.ObjectOutputStream s) throws java.io.IOException
  1076. {
  1077. String[] args = null;
  1078. java.util.Properties props = null;
  1079. String str = org.omg.CORBA.ORB.init (args, props).object_to_string (this);
  1080. s.writeUTF (str);
  1081. }
  1082. } // class _DynUnionStub