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