1. /*
  2. * @(#)DynAny.java 1.12 01/11/29
  3. *
  4. * Copyright 2002 Sun Microsystems, Inc. All rights reserved.
  5. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  6. */
  7. package org.omg.CORBA;
  8. /**
  9. * An object that enables the dynamic management of <code>Any</code>
  10. * values. A <code>DynAny</code> object allows a program to use
  11. * an <code>Any</code> object
  12. * when the program has no static information about the type of the
  13. * <code>Any</code> object. The <code>DynAny</code> interface
  14. * provides methods for traversing the data value associated with an
  15. * <code>Any</code> object at run time and for extracting the primitive
  16. * constituents of the data value.
  17. * <p>
  18. * A <code>DynAny</code> object is associated with a data value
  19. * that may correspond to a copy of the value inserted into an
  20. * <code>Any</code> object. The <code>DynAny</code> object may be seen as
  21. * owning a pointer to an external buffer that holds some representation
  22. * of the data value.
  23. * <p>
  24. * For data values that are constructed types (IDL
  25. * struct, sequence, array, union, and so on), the <code>DynAny</code>
  26. * object also can be thought of as holding a pointer to a buffer offset
  27. * where the current component of the constructed type is being represented.
  28. * The buffer pointer effectively points
  29. * to the space used to represent the first component of the data value
  30. * when the programmer creates the <code>DynAny</code> object. Calling
  31. * the <code>DynAny</code> method <code>next</code> will move the pointer
  32. * to the next component, making it possible to iterate through the
  33. * components of a constructed data value. The buffer pointer is moved
  34. * back to the first component each time the method <code>rewind</code>
  35. * is called.
  36. * <p>
  37. * <code>DynAny</code> methods make it possible to do the following:
  38. * <ul>
  39. * <li> Obtain the type code associated with a <code>DynAny</code> object
  40. * <li> Initialize a <code>DynAny</code> object from another
  41. * <code>DynAny</code> object
  42. * <li> Initialize a <code>DynAny</code> object from an
  43. * <code>Any</code> value
  44. * <li> Generate an <code>Any</code> value from a <code>DynAny</code>
  45. * object
  46. * <li> Destroy a <code>DynAny</code> object
  47. * <li> Create a copy of a <code>DynAny</code> object
  48. * <li> Access a value of some basic type in a <code>DynAny</code> object
  49. * <li> Iterate through components of a <code>DynAny</code> object
  50. * </ul>
  51. * <p>
  52. * Inserting a basic data type value into a constructed <code>DynAny</code>
  53. * object implies initializing the next component of the constructed data
  54. * value associated with the <code>DynAny</code> object. For example,
  55. * invoking the method <code>insert_boolean</code> in a <code>DynStruct</code>
  56. * implies inserting a <code>boolean</code> data value as the next member
  57. * of the associated struct data value.
  58. * <p>
  59. * Creating a <code>DynAny</code> object can be done by:
  60. * <ul>
  61. * <li> invoking a method on an existing <code>DynAny</code> object
  62. * <li> invoking an <code>org.omg.CORBA.ORB</code> method (create_dyn_any,
  63. * create_dyn_struct, create_dyn_sequence, and so on)
  64. * </ul>
  65. * <p>
  66. * Dynamic creation of an <code>Any</code> object containing a value
  67. * of a basic data type typically involves the following:
  68. * <ul>
  69. * <li> Creating a <code>DynAny</code> object using
  70. * <code>ORB.create_basic_dyn_any</code>,
  71. * passing it the type code associated with the basic data type value to
  72. * be created
  73. * <li> Initializing the value by means of invoking methods on the resulting
  74. * <code>DynAny</code> object (<code>insert_boolean</code> if the
  75. * <code>DynAny</code> is of type <code>boolean</code>, for example)
  76. * <li> Creating the <code>Any</code> object by invoking the method
  77. * <code>to_any</code> on the initialized <code>DynAny</code> object
  78. * </ul>
  79. * <p>
  80. * Dynamic creation of an <code>Any</code> object containing a value
  81. * of a constructed data type typically involves the following:
  82. * <ul>
  83. * <li> Creating a <code>DynAny</code> object using the appropriate <code>ORB</code>
  84. * method (for example, <code>ORB.create_dyn_struct</code> for an IDL struct),
  85. * passing it the type code associated with the constructed data type value to
  86. * be created
  87. * <li> Initializing components of the value by means of:
  88. * <ul>
  89. * <li>invoking methods on the resulting <code>DynStruct</code>
  90. * (or other constructed type) object
  91. * <ul>
  92. * <li>call the method <code>current_component</code> to get a
  93. * <code>DynAny</code> object for that component
  94. * <li> call the appropriate <code>insert</code> method
  95. * on the <code>DynAny</code> object returned by
  96. * the method <code>current_component</code> to initialize
  97. * the component
  98. * <li> call the method <code>next</code> to move to the next component
  99. * and continue to get the current component, initialize it, and move
  100. * to the next component until there are no more components (the method
  101. * <code>next</code> returns <code>false</code>)
  102. * </ul>
  103. * <li> or invoking methods on the
  104. * <code>DynAny</code> objects generated for each member of the
  105. * constructed type
  106. * </ul>
  107. * <li> Creating the <code>Any</code> object by invoking the method
  108. * <code>to_any</code> on the initialized <code>DynAny</code> object
  109. * </ul>
  110. * <p>
  111. * <code>DynAny</code> objects are intended to be local to the
  112. * process in which they are created and used. Any method that
  113. * attempts to export references to <code>DynAny</code> objects
  114. * to other processes or to externalize them with the method
  115. * <code>org.omg.CORBA.ORB.object_to_string</code> will throw a
  116. * <code>MARSHAL</code> exception. Also, even though <code>DynAny</code>
  117. * objects are derived from the interface <code>Object</code>, invoking
  118. * methods from <code>Object</code> will throw the <code>NO_IMPLEMENT</code>
  119. * exception. An attempt to use a <code>DynAny</code> object with the
  120. * DII (Dynamic Invocation Interface) may throw a <code>NO_IMPLEMENT</code>
  121. * exception.
  122. * <p>
  123. * The following classes are derived from <code>DynAny</code>
  124. * and define additional methods relevant to their particular
  125. * IDL type: <code>DynFixed</code>, <code>DynStruct</code>, <code>DynSequence</code>,
  126. * <code>DynArray</code>, <code>DynUnion</code>, <code>DynEnum</code>,
  127. * <code>DynAny</code>, and <code>DynValue</code>.
  128. */
  129. public interface DynAny extends org.omg.CORBA.Object
  130. {
  131. /**
  132. * Retrieves the <code>TypeCode</code> object contained in
  133. * this <code>DynAny</code> object. Note that the type code
  134. * associated with a <code>DynAny</code> object is initialized
  135. * at the time <code>DynAny</code> is created and cannot be changed
  136. * during the lifetime of the <code>DynAny</code> object.
  137. *
  138. * @return the <code>TypeCode</code> object describing the
  139. * value contained in this <code>DynAny</code> object
  140. */
  141. public org.omg.CORBA.TypeCode type() ;
  142. /**
  143. * Initializes the value associated with this <code>DynAny</code>
  144. * object with the value associated with the given <code>DynAny</code>
  145. * object.
  146. *
  147. * @param dyn_any the <code>DynAny</code> object whose value will be
  148. * used to initialize this <code>DynAny</code> object
  149. * @exception <code>org.omg.CORBA.DynAnyPackage.Invalid</code>
  150. * if the given <code>DynAny</code> object has a type code
  151. * that is not equivalent or has not been assigned a value
  152. */
  153. public void assign(org.omg.CORBA.DynAny dyn_any)
  154. throws org.omg.CORBA.DynAnyPackage.Invalid;
  155. /**
  156. * Initializes the value associated with this <code>DynAny</code>
  157. * object with the value associated with the given <code>Any</code>
  158. * object.
  159. * @param value the <code>Any</code> object whose value will be
  160. * used to initialize this <code>DynAny</code> object
  161. * @exception <code>org.omg.CORBA.DynAnyPackage.Invalid</code>
  162. * if the given <code>Any</code> object has a type code
  163. * that is not equivalent or has not been assigned a value
  164. */
  165. public void from_any(org.omg.CORBA.Any value)
  166. throws org.omg.CORBA.DynAnyPackage.Invalid;
  167. /**
  168. * Creates an <code>Any</code> object from this <code>DynAny</code>
  169. * object. The type code and value of this <code>DynAny</code>
  170. * object are copied into the newly-created <code>Any</code> object.
  171. *
  172. * @return the newly-created <code>Any</code> object
  173. * @exception <code>org.omg.CORBA.DynAnyPackage.Invalid</code> if
  174. * this <code>DynAny</code> object has not been correctly
  175. * created or does not contain a meaningful value
  176. */
  177. public org.omg.CORBA.Any to_any()
  178. throws org.omg.CORBA.DynAnyPackage.Invalid;
  179. /**
  180. * Destroys this <code>DynAny</code> object and frees any resources
  181. * used to represent the data value associated with it. This method
  182. * also destroys all <code>DynAny</code> objects obtained from it.
  183. * <p>
  184. * Destruction of <code>DynAny</code> objects should be handled with
  185. * care, taking into account issues dealing with the representation of
  186. * data values associated with <code>DynAny</code> objects. A programmer
  187. * who wants to destroy a <code>DynAny</code> object but still be able
  188. * to manipulate some component of the data value associated with it,
  189. * should first create a <code>DynAny</code> object for the component
  190. * and then make a copy of the created <code>DynAny</code> object.
  191. */
  192. public void destroy() ;
  193. /**
  194. * Clone this </code>DnyAny</code>.
  195. *
  196. * @return the <code>DynAny</code>.
  197. */
  198. public org.omg.CORBA.DynAny copy() ;
  199. /**
  200. * Inserts the given <code>boolean</code> as the value for this
  201. * <code>DynAny</code> object.
  202. *
  203. * <p> If this method is called on a constructed <code>DynAny</code>
  204. * object, it initializes the next component of the constructed data
  205. * value associated with this <code>DynAny</code> object.
  206. *
  207. * @param value the <code>boolean</code> to insert into this
  208. * <code>DynAny</code> object
  209. * @exception <code>org.omg.CORBA.DynAnyPackage.InvalidValue</code>
  210. * if the value inserted is not consistent with the type
  211. * of the accessed component in this <code>DynAny</code> object
  212. */
  213. public void insert_boolean(boolean value)
  214. throws org.omg.CORBA.DynAnyPackage.InvalidValue;
  215. /**
  216. * Inserts the given <code>byte</code> as the value for this
  217. * <code>DynAny</code> object.
  218. *
  219. * <p> If this method is called on a constructed <code>DynAny</code>
  220. * object, it initializes the next component of the constructed data
  221. * value associated with this <code>DynAny</code> object.
  222. *
  223. * @param value the <code>byte</code> to insert into this
  224. * <code>DynAny</code> object
  225. * @exception <code>org.omg.CORBA.DynAnyPackage.InvalidValue</code>
  226. * if the value inserted is not consistent with the type
  227. * of the accessed component in this <code>DynAny</code> object
  228. */
  229. public void insert_octet(byte value)
  230. throws org.omg.CORBA.DynAnyPackage.InvalidValue;
  231. /**
  232. * Inserts the given <code>char</code> as the value for this
  233. * <code>DynAny</code> object.
  234. *
  235. * <p> If this method is called on a constructed <code>DynAny</code>
  236. * object, it initializes the next component of the constructed data
  237. * value associated with this <code>DynAny</code> object.
  238. *
  239. * @param value the <code>char</code> to insert into this
  240. * <code>DynAny</code> object
  241. * @exception <code>org.omg.CORBA.DynAnyPackage.InvalidValue</code>
  242. * if the value inserted is not consistent with the type
  243. * of the accessed component in this <code>DynAny</code> object
  244. */
  245. public void insert_char(char value)
  246. throws org.omg.CORBA.DynAnyPackage.InvalidValue;
  247. /**
  248. * Inserts the given <code>short</code> as the value for this
  249. * <code>DynAny</code> object.
  250. *
  251. * <p> If this method is called on a constructed <code>DynAny</code>
  252. * object, it initializes the next component of the constructed data
  253. * value associated with this <code>DynAny</code> object.
  254. *
  255. * @param value the <code>short</code> to insert into this
  256. * <code>DynAny</code> object
  257. * @exception <code>org.omg.CORBA.DynAnyPackage.InvalidValue</code>
  258. * if the value inserted is not consistent with the type
  259. * of the accessed component in this <code>DynAny</code> object
  260. */
  261. public void insert_short(short value)
  262. throws org.omg.CORBA.DynAnyPackage.InvalidValue;
  263. /**
  264. * Inserts the given <code>short</code> as the value for this
  265. * <code>DynAny</code> object.
  266. *
  267. * <p> If this method is called on a constructed <code>DynAny</code>
  268. * object, it initializes the next component of the constructed data
  269. * value associated with this <code>DynAny</code> object.
  270. *
  271. * @param value the <code>short</code> to insert into this
  272. * <code>DynAny</code> object
  273. * @exception <code>org.omg.CORBA.DynAnyPackage.InvalidValue</code>
  274. * if the value inserted is not consistent with the type
  275. * of the accessed component in this <code>DynAny</code> object
  276. */
  277. public void insert_ushort(short value)
  278. throws org.omg.CORBA.DynAnyPackage.InvalidValue;
  279. /**
  280. * Inserts the given <code>int</code> as the value for this
  281. * <code>DynAny</code> object.
  282. *
  283. * <p> If this method is called on a constructed <code>DynAny</code>
  284. * object, it initializes the next component of the constructed data
  285. * value associated with this <code>DynAny</code> object.
  286. *
  287. * @param value the <code>int</code> to insert into this
  288. * <code>DynAny</code> object
  289. * @exception <code>org.omg.CORBA.DynAnyPackage.InvalidValue</code>
  290. * if the value inserted is not consistent with the type
  291. * of the accessed component in this <code>DynAny</code> object
  292. */
  293. public void insert_long(int value)
  294. throws org.omg.CORBA.DynAnyPackage.InvalidValue;
  295. /**
  296. * Inserts the given <code>int</code> as the value for this
  297. * <code>DynAny</code> object.
  298. *
  299. * <p> If this method is called on a constructed <code>DynAny</code>
  300. * object, it initializes the next component of the constructed data
  301. * value associated with this <code>DynAny</code> object.
  302. *
  303. * @param value the <code>int</code> to insert into this
  304. * <code>DynAny</code> object
  305. * @exception <code>org.omg.CORBA.DynAnyPackage.InvalidValue</code>
  306. * if the value inserted is not consistent with the type
  307. * of the accessed component in this <code>DynAny</code> object
  308. */
  309. public void insert_ulong(int value)
  310. throws org.omg.CORBA.DynAnyPackage.InvalidValue;
  311. /**
  312. * Inserts the given <code>float</code> as the value for this
  313. * <code>DynAny</code> object.
  314. *
  315. * <p> If this method is called on a constructed <code>DynAny</code>
  316. * object, it initializes the next component of the constructed data
  317. * value associated with this <code>DynAny</code> object.
  318. *
  319. * @param value the <code>float</code> to insert into this
  320. * <code>DynAny</code> object
  321. * @exception <code>org.omg.CORBA.DynAnyPackage.InvalidValue</code>
  322. * if the value inserted is not consistent with the type
  323. * of the accessed component in this <code>DynAny</code> object
  324. */
  325. public void insert_float(float value)
  326. throws org.omg.CORBA.DynAnyPackage.InvalidValue;
  327. /**
  328. * Inserts the given <code>double</code> as the value for this
  329. * <code>DynAny</code> object.
  330. *
  331. * <p> If this method is called on a constructed <code>DynAny</code>
  332. * object, it initializes the next component of the constructed data
  333. * value associated with this <code>DynAny</code> object.
  334. *
  335. * @param value the <code>double</code> to insert into this
  336. * <code>DynAny</code> object
  337. * @exception <code>org.omg.CORBA.DynAnyPackage.InvalidValue</code>
  338. * if the value inserted is not consistent with the type
  339. * of the accessed component in this <code>DynAny</code> object
  340. */
  341. public void insert_double(double value)
  342. throws org.omg.CORBA.DynAnyPackage.InvalidValue;
  343. /**
  344. * Inserts the given <code>String</code> object as the value for this
  345. * <code>DynAny</code> object.
  346. *
  347. * <p> If this method is called on a constructed <code>DynAny</code>
  348. * object, it initializes the next component of the constructed data
  349. * value associated with this <code>DynAny</code> object.
  350. *
  351. * @param value the <code>String</code> to insert into this
  352. * <code>DynAny</code> object
  353. * @exception <code>org.omg.CORBA.DynAnyPackage.InvalidValue</code>
  354. * if the value inserted is not consistent with the type
  355. * of the accessed component in this <code>DynAny</code> object
  356. */
  357. public void insert_string(String value)
  358. throws org.omg.CORBA.DynAnyPackage.InvalidValue;
  359. /**
  360. * Inserts the given <code>org.omg.CORBA.Object</code> as the value for this
  361. * <code>DynAny</code> object.
  362. *
  363. * <p> If this method is called on a constructed <code>DynAny</code>
  364. * object, it initializes the next component of the constructed data
  365. * value associated with this <code>DynAny</code> object.
  366. *
  367. * @param value the <code>org.omg.CORBA.Object</code> to insert into this
  368. * <code>DynAny</code> object
  369. * @exception <code>org.omg.CORBA.DynAnyPackage.InvalidValue</code>
  370. * if the value inserted is not consistent with the type
  371. * of the accessed component in this <code>DynAny</code> object
  372. */
  373. public void insert_reference(org.omg.CORBA.Object value)
  374. throws org.omg.CORBA.DynAnyPackage.InvalidValue;
  375. /**
  376. * Inserts the given <code>org.omg.CORBA.TypeCode</code> as the value for this
  377. * <code>DynAny</code> object.
  378. *
  379. * <p> If this method is called on a constructed <code>DynAny</code>
  380. * object, it initializes the next component of the constructed data
  381. * value associated with this <code>DynAny</code> object.
  382. *
  383. * @param value the <code>org.omg.CORBA.TypeCode</code> to insert into this
  384. * <code>DynAny</code> object
  385. * @exception <code>org.omg.CORBA.DynAnyPackage.InvalidValue</code>
  386. * if the value inserted is not consistent with the type
  387. * of the accessed component in this <code>DynAny</code> object
  388. */
  389. public void insert_typecode(org.omg.CORBA.TypeCode value)
  390. throws org.omg.CORBA.DynAnyPackage.InvalidValue;
  391. /**
  392. * Inserts the given <code>long</code> as the value for this
  393. * <code>DynAny</code> object.
  394. *
  395. * <p> If this method is called on a constructed <code>DynAny</code>
  396. * object, it initializes the next component of the constructed data
  397. * value associated with this <code>DynAny</code> object.
  398. *
  399. * @param value the <code>long</code> to insert into this
  400. * <code>DynAny</code> object
  401. * @exception <code>org.omg.CORBA.DynAnyPackage.InvalidValue</code>
  402. * if the value inserted is not consistent with the type
  403. * of the accessed component in this <code>DynAny</code> object
  404. */
  405. public void insert_longlong(long value)
  406. throws org.omg.CORBA.DynAnyPackage.InvalidValue;
  407. /**
  408. * Inserts the given <code>long</code> as the value for this
  409. * <code>DynAny</code> object.
  410. *
  411. * <p> If this method is called on a constructed <code>DynAny</code>
  412. * object, it initializes the next component of the constructed data
  413. * value associated with this <code>DynAny</code> object.
  414. *
  415. * @param value the <code>long</code> to insert into this
  416. * <code>DynAny</code> object
  417. * @exception <code>org.omg.CORBA.DynAnyPackage.InvalidValue</code>
  418. * if the value inserted is not consistent with the type
  419. * of the accessed component in this <code>DynAny</code> object
  420. */
  421. public void insert_ulonglong(long value)
  422. throws org.omg.CORBA.DynAnyPackage.InvalidValue;
  423. /**
  424. * Inserts the given <code>char</code> as the value for this
  425. * <code>DynAny</code> object.
  426. *
  427. * <p> If this method is called on a constructed <code>DynAny</code>
  428. * object, it initializes the next component of the constructed data
  429. * value associated with this <code>DynAny</code> object.
  430. *
  431. * @param value the <code>char</code> to insert into this
  432. * <code>DynAny</code> object
  433. * @exception <code>org.omg.CORBA.DynAnyPackage.InvalidValue</code>
  434. * if the value inserted is not consistent with the type
  435. * of the accessed component in this <code>DynAny</code> object
  436. */
  437. public void insert_wchar(char value)
  438. throws org.omg.CORBA.DynAnyPackage.InvalidValue;
  439. /**
  440. * Inserts the given <code>String</code> as the value for this
  441. * <code>DynAny</code> object.
  442. *
  443. * <p> If this method is called on a constructed <code>DynAny</code>
  444. * object, it initializes the next component of the constructed data
  445. * value associated with this <code>DynAny</code> object.
  446. *
  447. * @param value the <code>String</code> to insert into this
  448. * <code>DynAny</code> object
  449. * @exception <code>org.omg.CORBA.DynAnyPackage.InvalidValue</code>
  450. * if the value inserted is not consistent with the type
  451. * of the accessed component in this <code>DynAny</code> object
  452. */
  453. public void insert_wstring(String value)
  454. throws org.omg.CORBA.DynAnyPackage.InvalidValue;
  455. /**
  456. * Inserts the given <code>org.omg.CORBA.Any</code> object as the value for this
  457. * <code>DynAny</code> object.
  458. *
  459. * <p> If this method is called on a constructed <code>DynAny</code>
  460. * object, it initializes the next component of the constructed data
  461. * value associated with this <code>DynAny</code> object.
  462. *
  463. * @param value the <code>org.omg.CORBA.Any</code> object to insert into this
  464. * <code>DynAny</code> object
  465. * @exception <code>org.omg.CORBA.DynAnyPackage.InvalidValue</code>
  466. * if the value inserted is not consistent with the type
  467. * of the accessed component in this <code>DynAny</code> object
  468. */
  469. public void insert_any(org.omg.CORBA.Any value)
  470. throws org.omg.CORBA.DynAnyPackage.InvalidValue;
  471. // orbos 98-01-18: Objects By Value -- begin
  472. /**
  473. * Inserts the given <code>java.io.Serializable</code> object as the value for this
  474. * <code>DynAny</code> object.
  475. *
  476. * <p> If this method is called on a constructed <code>DynAny</code>
  477. * object, it initializes the next component of the constructed data
  478. * value associated with this <code>DynAny</code> object.
  479. *
  480. * @param value the <code>java.io.Serializable</code> object to insert into this
  481. * <code>DynAny</code> object
  482. * @exception <code>org.omg.CORBA.DynAnyPackage.InvalidValue</code>
  483. * if the value inserted is not consistent with the type
  484. * of the accessed component in this <code>DynAny</code> object
  485. */
  486. public void insert_val(java.io.Serializable value)
  487. throws org.omg.CORBA.DynAnyPackage.InvalidValue;
  488. /**
  489. * Retrieves the <code>java.io.Serializable</code> object contained
  490. * in this <code>DynAny</code> object.
  491. *
  492. * @return the <code>java.io.Serializable</code> object that is the
  493. * value for this <code>DynAny</code> object
  494. * @exception <code>org.omg.CORBA.DynAnyPackage.TypeMismatch</code>
  495. * if the type code of the accessed component in this
  496. * <code>DynAny</code> object is not equivalent to
  497. * the type code for a <code>java.io.Serializable</code> object
  498. */
  499. public java.io.Serializable get_val()
  500. throws org.omg.CORBA.DynAnyPackage.TypeMismatch;
  501. // orbos 98-01-18: Objects By Value -- end
  502. /**
  503. * Retrieves the <code>boolean</code> contained
  504. * in this <code>DynAny</code> object.
  505. *
  506. * @return the <code>boolean</code> that is the
  507. * value for this <code>DynAny</code> object
  508. * @exception <code>org.omg.CORBA.DynAnyPackage.TypeMismatch</code>
  509. * if the type code of the accessed component in this
  510. * <code>DynAny</code> object is not equivalent to
  511. * the type code for a <code>boolean</code>
  512. */
  513. public boolean get_boolean()
  514. throws org.omg.CORBA.DynAnyPackage.TypeMismatch;
  515. /**
  516. * Retrieves the <code>byte</code> contained
  517. * in this <code>DynAny</code> object.
  518. *
  519. * @return the <code>byte</code> that is the
  520. * value for this <code>DynAny</code> object
  521. * @exception <code>org.omg.CORBA.DynAnyPackage.TypeMismatch</code>
  522. * if the type code of the accessed component in this
  523. * <code>DynAny</code> object is not equivalent to
  524. * the type code for a <code>byte</code>
  525. */
  526. public byte get_octet()
  527. throws org.omg.CORBA.DynAnyPackage.TypeMismatch;
  528. /**
  529. * Retrieves the <code>char</code> contained
  530. * in this <code>DynAny</code> object.
  531. *
  532. * @return the <code>char</code> that is the
  533. * value for this <code>DynAny</code> object
  534. * @exception <code>org.omg.CORBA.DynAnyPackage.TypeMismatch</code>
  535. * if the type code of the accessed component in this
  536. * <code>DynAny</code> object is not equivalent to
  537. * the type code for a <code>char</code>
  538. */
  539. public char get_char()
  540. throws org.omg.CORBA.DynAnyPackage.TypeMismatch;
  541. /**
  542. * Retrieves the <code>short</code> contained
  543. * in this <code>DynAny</code> object.
  544. *
  545. * @return the <code>short</code> that is the
  546. * value for this <code>DynAny</code> object
  547. * @exception <code>org.omg.CORBA.DynAnyPackage.TypeMismatch</code>
  548. * if the type code of the accessed component in this
  549. * <code>DynAny</code> object is not equivalent to
  550. * the type code for a <code>short</code>
  551. */
  552. public short get_short()
  553. throws org.omg.CORBA.DynAnyPackage.TypeMismatch;
  554. /**
  555. * Retrieves the <code>short</code> contained
  556. * in this <code>DynAny</code> object.
  557. *
  558. * @return the <code>short</code> that is the
  559. * value for this <code>DynAny</code> object
  560. * @exception <code>org.omg.CORBA.DynAnyPackage.TypeMismatch</code>
  561. * if the type code of the accessed component in this
  562. * <code>DynAny</code> object is not equivalent to
  563. * the type code for a <code>short</code>
  564. */
  565. public short get_ushort()
  566. throws org.omg.CORBA.DynAnyPackage.TypeMismatch;
  567. /**
  568. * Retrieves the <code>int</code> contained
  569. * in this <code>DynAny</code> object.
  570. *
  571. * @return the <code>int</code> that is the
  572. * value for this <code>DynAny</code> object
  573. * @exception <code>org.omg.CORBA.DynAnyPackage.TypeMismatch</code>
  574. * if the type code of the accessed component in this
  575. * <code>DynAny</code> object is not equivalent to
  576. * the type code for a <code>int</code>
  577. */
  578. public int get_long()
  579. throws org.omg.CORBA.DynAnyPackage.TypeMismatch;
  580. /**
  581. * Retrieves the <code>int</code> contained
  582. * in this <code>DynAny</code> object.
  583. *
  584. * @return the <code>int</code> that is the
  585. * value for this <code>DynAny</code> object
  586. * @exception <code>org.omg.CORBA.DynAnyPackage.TypeMismatch</code>
  587. * if the type code of the accessed component in this
  588. * <code>DynAny</code> object is not equivalent to
  589. * the type code for a <code>int</code>
  590. */
  591. public int get_ulong()
  592. throws org.omg.CORBA.DynAnyPackage.TypeMismatch;
  593. /**
  594. * Retrieves the <code>float</code> contained
  595. * in this <code>DynAny</code> object.
  596. *
  597. * @return the <code>float</code> that is the
  598. * value for this <code>DynAny</code> object
  599. * @exception <code>org.omg.CORBA.DynAnyPackage.TypeMismatch</code>
  600. * if the type code of the accessed component in this
  601. * <code>DynAny</code> object is not equivalent to
  602. * the type code for a <code>float</code>
  603. */
  604. public float get_float()
  605. throws org.omg.CORBA.DynAnyPackage.TypeMismatch;
  606. /**
  607. * Retrieves the <code>double</code> contained
  608. * in this <code>DynAny</code> object.
  609. *
  610. * @return the <code>double</code> that is the
  611. * value for this <code>DynAny</code> object
  612. * @exception <code>org.omg.CORBA.DynAnyPackage.TypeMismatch</code>
  613. * if the type code of the accessed component in this
  614. * <code>DynAny</code> object is not equivalent to
  615. * the type code for a <code>double</code>
  616. */
  617. public double get_double()
  618. throws org.omg.CORBA.DynAnyPackage.TypeMismatch;
  619. /**
  620. * Retrieves the <code>String</code> contained
  621. * in this <code>DynAny</code> object.
  622. *
  623. * @return the <code>String</code> that is the
  624. * value for this <code>DynAny</code> object
  625. * @exception <code>org.omg.CORBA.DynAnyPackage.TypeMismatch</code>
  626. * if the type code of the accessed component in this
  627. * <code>DynAny</code> object is not equivalent to
  628. * the type code for a <code>String</code>
  629. */
  630. public String get_string()
  631. throws org.omg.CORBA.DynAnyPackage.TypeMismatch;
  632. /**
  633. * Retrieves the <code>org.omg.CORBA.Other</code> contained
  634. * in this <code>DynAny</code> object.
  635. *
  636. * @return the <code>org.omg.CORBA.Other</code> that is the
  637. * value for this <code>DynAny</code> object
  638. * @exception <code>org.omg.CORBA.DynAnyPackage.TypeMismatch</code>
  639. * if the type code of the accessed component in this
  640. * <code>DynAny</code> object is not equivalent to
  641. * the type code for an <code>org.omg.CORBA.Other</code>
  642. */
  643. public org.omg.CORBA.Object get_reference()
  644. throws org.omg.CORBA.DynAnyPackage.TypeMismatch;
  645. /**
  646. * Retrieves the <code>org.omg.CORBA.TypeCode</code> contained
  647. * in this <code>DynAny</code> object.
  648. *
  649. * @return the <code>org.omg.CORBA.TypeCode</code> that is the
  650. * value for this <code>DynAny</code> object
  651. * @exception <code>org.omg.CORBA.DynAnyPackage.TypeMismatch</code>
  652. * if the type code of the accessed component in this
  653. * <code>DynAny</code> object is not equivalent to
  654. * the type code for a <code>org.omg.CORBA.TypeCode</code>
  655. */
  656. public org.omg.CORBA.TypeCode get_typecode()
  657. throws org.omg.CORBA.DynAnyPackage.TypeMismatch;
  658. /**
  659. * Retrieves the <code>long</code> contained
  660. * in this <code>DynAny</code> object.
  661. *
  662. * @return the <code>long</code> that is the
  663. * value for this <code>DynAny</code> object
  664. * @exception <code>org.omg.CORBA.DynAnyPackage.TypeMismatch</code>
  665. * if the type code of the accessed component in this
  666. * <code>DynAny</code> object is not equivalent to
  667. * the type code for a <code>long</code>
  668. */
  669. public long get_longlong()
  670. throws org.omg.CORBA.DynAnyPackage.TypeMismatch;
  671. /**
  672. * Retrieves the <code>long</code> contained
  673. * in this <code>DynAny</code> object.
  674. *
  675. * @return the <code>long</code> that is the
  676. * value for this <code>DynAny</code> object
  677. * @exception <code>org.omg.CORBA.DynAnyPackage.TypeMismatch</code>
  678. * if the type code of the accessed component in this
  679. * <code>DynAny</code> object is not equivalent to
  680. * the type code for a <code>long</code>
  681. */
  682. public long get_ulonglong()
  683. throws org.omg.CORBA.DynAnyPackage.TypeMismatch;
  684. /**
  685. * Retrieves the <code>char</code> contained
  686. * in this <code>DynAny</code> object.
  687. *
  688. * @return the <code>char</code> that is the
  689. * value for this <code>DynAny</code> object
  690. * @exception <code>org.omg.CORBA.DynAnyPackage.TypeMismatch</code>
  691. * if the type code of the accessed component in this
  692. * <code>DynAny</code> object is not equivalent to
  693. * the type code for a <code>char</code>
  694. */
  695. public char get_wchar()
  696. throws org.omg.CORBA.DynAnyPackage.TypeMismatch;
  697. /**
  698. * Retrieves the <code>String</code> contained
  699. * in this <code>DynAny</code> object.
  700. *
  701. * @return the <code>String</code> that is the
  702. * value for this <code>DynAny</code> object
  703. * @exception <code>org.omg.CORBA.DynAnyPackage.TypeMismatch</code>
  704. * if the type code of the accessed component in this
  705. * <code>DynAny</code> object is not equivalent to
  706. * the type code for a <code>String</code>
  707. */
  708. public String get_wstring()
  709. throws org.omg.CORBA.DynAnyPackage.TypeMismatch;
  710. /**
  711. * Retrieves the <code>org.omg.CORBA.Any</code> contained
  712. * in this <code>DynAny</code> object.
  713. *
  714. * @return the <code>org.omg.CORBA.Any</code> that is the
  715. * value for this <code>DynAny</code> object
  716. * @exception <code>org.omg.CORBA.DynAnyPackage.TypeMismatch</code>
  717. * if the type code of the accessed component in this
  718. * <code>DynAny</code> object is not equivalent to
  719. * the type code for a <code>org.omg.CORBA.Any</code>
  720. */
  721. public org.omg.CORBA.Any get_any()
  722. throws org.omg.CORBA.DynAnyPackage.TypeMismatch;
  723. /**
  724. * Returns a <code>DynAny</code> object reference that can
  725. * be used to get/set the value of the component currently accessed.
  726. * The appropriate or <code>insert</code> method
  727. * can be called on the resulting <code>DynAny</code> object
  728. * to initialize the component.
  729. * The appropriate <code>get</code> method
  730. * can be called on the resulting <code>DynAny</code> object
  731. * to extract the value of the component.
  732. */
  733. public org.omg.CORBA.DynAny current_component() ;
  734. /**
  735. * Moves to the next component of this <code>DynAny</code> object.
  736. * This method is used for iterating through the components of
  737. * a constructed type, effectively moving a pointer from one
  738. * component to the next. The pointer starts out on the first
  739. * component when a <code>DynAny</code> object is created.
  740. *
  741. * @return <code>true</code> if the pointer points to a component;
  742. * <code>false</code> if there are no more components or this
  743. * <code>DynAny</code> is associated with a basic type rather than
  744. * a constructed type
  745. */
  746. public boolean next() ;
  747. /**
  748. * Moves the internal pointer to the given index. Logically, this method
  749. * sets a new offset for this pointer.
  750. *
  751. * @param index an <code>int</code> indicating the position to which
  752. * the pointer should move. The first position is 0.
  753. * @return <code>true</code> if the pointer points to a component;
  754. * <code>false</code> if there is no component at the designated
  755. * index. If this <code>DynAny</code> object is associated with a
  756. * basic type, this method returns <code>false</code> for any index
  757. * other than 0.
  758. */
  759. public boolean seek(int index) ;
  760. /**
  761. * Moves the internal pointer to the first component.
  762. */
  763. public void rewind() ;
  764. }