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