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