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