1. package org.omg.DynamicAny;
  2. /**
  3. * org/omg/DynamicAny/DynAnyOperations.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. * Any values can be dynamically interpreted (traversed) and constructed through DynAny objects.
  10. * A DynAny object is associated with a data value which corresponds to a copy of the value
  11. * inserted into an any.
  12. * <P>A DynAny object may be viewed as an ordered collection of component DynAnys.
  13. * For DynAnys representing a basic type, such as long, or a type without components,
  14. * such as an empty exception, the ordered collection of components is empty.
  15. * Each DynAny object maintains the notion of a current position into its collection
  16. * of component DynAnys. The current position is identified by an index value that runs
  17. * from 0 to n-1, where n is the number of components.
  18. * The special index value -1 indicates a current position that points nowhere.
  19. * For values that cannot have a current position (such as an empty exception),
  20. * the index value is fixed at -1.
  21. * If a DynAny is initialized with a value that has components, the index is initialized to 0.
  22. * After creation of an uninitialized DynAny (that is, a DynAny that has no value but a TypeCode
  23. * that permits components), the current position depends on the type of value represented by
  24. * the DynAny. (The current position is set to 0 or -1, depending on whether the new DynAny
  25. * gets default values for its components.)
  26. * <P>The iteration operations rewind, seek, and next can be used to change the current position
  27. * and the current_component operation returns the component at the current position.
  28. * The component_count operation returns the number of components of a DynAny.
  29. * Collectively, these operations enable iteration over the components of a DynAny, for example,
  30. * to (recursively) examine its contents.
  31. * <P>A constructed DynAny object is a DynAny object associated with a constructed type.
  32. * There is a different interface, inheriting from the DynAny interface, associated with
  33. * each kind of constructed type in IDL (fixed, enum, struct, sequence, union, array,
  34. * exception, and value type).
  35. * <P>A constructed DynAny object exports operations that enable the creation of new DynAny objects,
  36. * each of them associated with a component of the constructed data value.
  37. * As an example, a DynStruct is associated with a struct value. This means that the DynStruct
  38. * may be seen as owning an ordered collection of components, one for each structure member.
  39. * The DynStruct object exports operations that enable the creation of new DynAny objects,
  40. * each of them associated with a member of the struct.
  41. * <P>If a DynAny object has been obtained from another (constructed) DynAny object,
  42. * such as a DynAny representing a structure member that was created from a DynStruct,
  43. * the member DynAny is logically contained in the DynStruct.
  44. * Calling an insert or get operation leaves the current position unchanged.
  45. * Destroying a top-level DynAny object (one that was not obtained as a component of another DynAny)
  46. * also destroys any component DynAny objects obtained from it.
  47. * Destroying a non-top level DynAny object does nothing.
  48. * Invoking operations on a destroyed top-level DynAny or any of its descendants raises OBJECT_NOT_EXIST.
  49. * If the programmer wants to destroy a DynAny object but still wants to manipulate some component
  50. * of the data value associated with it, then he or she should first create a DynAny for the component
  51. * and, after that, make a copy of the created DynAny object.
  52. * <P>The behavior of DynAny objects has been defined in order to enable efficient implementations
  53. * in terms of allocated memory space and speed of access. DynAny objects are intended to be used
  54. * for traversing values extracted from anys or constructing values of anys at runtime.
  55. * Their use for other purposes is not recommended.
  56. * <P>Insert and get operations are necessary to handle basic DynAny objects
  57. * but are also helpful to handle constructed DynAny objects.
  58. * Inserting a basic data type value into a constructed DynAny object
  59. * implies initializing the current component of the constructed data value
  60. * associated with the DynAny object. For example, invoking insert_boolean on a
  61. * DynStruct implies inserting a boolean data value at the current position
  62. * of the associated struct data value.
  63. * A type is consistent for inserting or extracting a value if its TypeCode is equivalent to
  64. * the TypeCode contained in the DynAny or, if the DynAny has components, is equivalent to the TypeCode
  65. * of the DynAny at the current position.
  66. * <P>DynAny and DynAnyFactory objects are intended to be local to the process in which they are
  67. * created and used. This means that references to DynAny and DynAnyFactory objects cannot be exported
  68. * to other processes, or externalized with ORB.object_to_string().
  69. * If any attempt is made to do so, the offending operation will raise a MARSHAL system exception.
  70. * Since their interfaces are specified in IDL, DynAny objects export operations defined in the standard
  71. * org.omg.CORBA.Object interface. However, any attempt to invoke operations exported through the Object
  72. * interface may raise the standard NO_IMPLEMENT exception.
  73. * An attempt to use a DynAny object with the DII may raise the NO_IMPLEMENT exception.
  74. */
  75. public interface DynAnyOperations
  76. {
  77. /**
  78. * Returns the TypeCode associated with this DynAny object.
  79. * A DynAny object is created with a TypeCode value assigned to it.
  80. * This TypeCode value determines the type of the value handled through the DynAny object.
  81. * Note that the TypeCode associated with a DynAny object is initialized at the time the
  82. * DynAny is created and cannot be changed during lifetime of the DynAny object.
  83. *
  84. * @return The TypeCode associated with this DynAny object
  85. */
  86. org.omg.CORBA.TypeCode type ();
  87. /**
  88. * Initializes the value associated with a DynAny object with the value
  89. * associated with another DynAny object.
  90. * The current position of the target DynAny is set to zero for values that have components
  91. * and to -1 for values that do not have components.
  92. *
  93. * @param dyn_any
  94. * @exception TypeMismatch if the type of the passed DynAny is not equivalent to the type of target DynAny
  95. */
  96. void assign (org.omg.DynamicAny.DynAny dyn_any) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch;
  97. /**
  98. * Initializes the value associated with a DynAny object with the value contained in an any.
  99. * The current position of the target DynAny is set to zero for values that have components
  100. * and to -1 for values that do not have components.
  101. *
  102. * @exception TypeMismatch if the type of the passed Any is not equivalent to the type of target DynAny
  103. * @exception InvalidValue if the passed Any does not contain a legal value (such as a null string)
  104. */
  105. void from_any (org.omg.CORBA.Any value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue;
  106. /**
  107. * Creates an any value from a DynAny object.
  108. * A copy of the TypeCode associated with the DynAny object is assigned to the resulting any.
  109. * The value associated with the DynAny object is copied into the any.
  110. *
  111. * @return a new Any object with the same value and TypeCode
  112. */
  113. org.omg.CORBA.Any to_any ();
  114. /**
  115. * Compares two DynAny values for equality.
  116. * Two DynAny values are equal if their TypeCodes are equivalent and, recursively, all component DynAnys
  117. * have equal values.
  118. * The current position of the two DynAnys being compared has no effect on the result of equal.
  119. *
  120. * @return true of the DynAnys are equal, false otherwise
  121. */
  122. boolean equal (org.omg.DynamicAny.DynAny dyn_any);
  123. /**
  124. * Destroys a DynAny object.
  125. * This operation frees any resources used to represent the data value associated with a DynAny object.
  126. * It must be invoked on references obtained from one of the creation operations on the ORB interface
  127. * or on a reference returned by DynAny.copy() to avoid resource leaks.
  128. * Invoking destroy on component DynAny objects (for example, on objects returned by the
  129. * current_component operation) does nothing.
  130. * Destruction of a DynAny object implies destruction of all DynAny objects obtained from it.
  131. * That is, references to components of a destroyed DynAny become invalid.
  132. * Invocations on such references raise OBJECT_NOT_EXIST.
  133. * It is possible to manipulate a component of a DynAny beyond the life time of the DynAny
  134. * from which the component was obtained by making a copy of the component with the copy operation
  135. * before destroying the DynAny from which the component was obtained.
  136. */
  137. void destroy ();
  138. /**
  139. * Creates a new DynAny object whose value is a deep copy of the DynAny on which it is invoked.
  140. * The operation is polymorphic, that is, invoking it on one of the types derived from DynAny,
  141. * such as DynStruct, creates the derived type but returns its reference as the DynAny base type.
  142. *
  143. * @return a deep copy of the DynAny object
  144. */
  145. org.omg.DynamicAny.DynAny copy ();
  146. /**
  147. * Inserts a boolean value into the DynAny.
  148. *
  149. * @exception InvalidValue if this DynAny has components but has a current position of -1
  150. * @exception TypeMismatch if called on a DynAny whose current component itself has components
  151. */
  152. void insert_boolean (boolean value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue;
  153. /**
  154. * Inserts a byte value into the DynAny. The IDL octet data type is mapped to the Java byte data type.
  155. *
  156. * @exception InvalidValue if this DynAny has components but has a current position of -1
  157. * @exception TypeMismatch if called on a DynAny whose current component itself has components
  158. */
  159. void insert_octet (byte value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue;
  160. /**
  161. * Inserts a char value into the DynAny.
  162. *
  163. * @exception InvalidValue if this DynAny has components but has a current position of -1
  164. * @exception TypeMismatch if called on a DynAny whose current component itself has components
  165. */
  166. void insert_char (char value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue;
  167. /**
  168. * Inserts a short value into the DynAny.
  169. *
  170. * @exception InvalidValue if this DynAny has components but has a current position of -1
  171. * @exception TypeMismatch if called on a DynAny whose current component itself has components
  172. */
  173. void insert_short (short value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue;
  174. /**
  175. * Inserts a short value into the DynAny. The IDL ushort data type is mapped to the Java short data type.
  176. *
  177. * @exception InvalidValue if this DynAny has components but has a current position of -1
  178. * @exception TypeMismatch if called on a DynAny whose current component itself has components
  179. */
  180. void insert_ushort (short value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue;
  181. /**
  182. * Inserts an integer value into the DynAny. The IDL long data type is mapped to the Java int data type.
  183. *
  184. * @exception InvalidValue if this DynAny has components but has a current position of -1
  185. * @exception TypeMismatch if called on a DynAny whose current component itself has components
  186. */
  187. void insert_long (int value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue;
  188. /**
  189. * Inserts an integer value into the DynAny. The IDL ulong data type is mapped to the Java int data type.
  190. *
  191. * @exception InvalidValue if this DynAny has components but has a current position of -1
  192. * @exception TypeMismatch if called on a DynAny whose current component itself has components
  193. */
  194. void insert_ulong (int value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue;
  195. /**
  196. * Inserts a float value into the DynAny.
  197. *
  198. * @exception InvalidValue if this DynAny has components but has a current position of -1
  199. * @exception TypeMismatch if called on a DynAny whose current component itself has components
  200. */
  201. void insert_float (float value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue;
  202. /**
  203. * Inserts a double value into the DynAny.
  204. *
  205. * @exception InvalidValue if this DynAny has components but has a current position of -1
  206. * @exception TypeMismatch if called on a DynAny whose current component itself has components
  207. */
  208. void insert_double (double value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue;
  209. /**
  210. * Inserts a string value into the DynAny.
  211. * Both bounded and unbounded strings are inserted using this method.
  212. *
  213. * @exception InvalidValue if this DynAny has components but has a current position of -1
  214. * @exception InvalidValue if the string inserted is longer than the bound of a bounded string
  215. * @exception TypeMismatch if called on a DynAny whose current component itself has components
  216. */
  217. void insert_string (String value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue;
  218. /**
  219. * Inserts a reference to a CORBA object into the DynAny.
  220. *
  221. * @exception InvalidValue if this DynAny has components but has a current position of -1
  222. * @exception TypeMismatch if called on a DynAny whose current component itself has components
  223. */
  224. void insert_reference (org.omg.CORBA.Object value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue;
  225. /**
  226. * Inserts a TypeCode object into the DynAny.
  227. *
  228. * @exception InvalidValue if this DynAny has components but has a current position of -1
  229. * @exception TypeMismatch if called on a DynAny whose current component itself has components
  230. */
  231. void insert_typecode (org.omg.CORBA.TypeCode value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue;
  232. /**
  233. * Inserts a long value into the DynAny. The IDL long long data type is mapped to the Java long data type.
  234. *
  235. * @exception InvalidValue if this DynAny has components but has a current position of -1
  236. * @exception TypeMismatch if called on a DynAny whose current component itself has components
  237. */
  238. void insert_longlong (long value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue;
  239. /**
  240. * Inserts a long value into the DynAny.
  241. * The IDL unsigned long long data type is mapped to the Java long data type.
  242. *
  243. * @exception InvalidValue if this DynAny has components but has a current position of -1
  244. * @exception TypeMismatch if called on a DynAny whose current component itself has components
  245. */
  246. void insert_ulonglong (long value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue;
  247. /**
  248. * Inserts a char value into the DynAny. The IDL wchar data type is mapped to the Java char 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. void insert_wchar (char value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue;
  254. /**
  255. * Inserts a string value into the DynAny.
  256. * Both bounded and unbounded strings are inserted using this method.
  257. *
  258. * @exception InvalidValue if this DynAny has components but has a current position of -1
  259. * @exception InvalidValue if the string inserted is longer than the bound of a bounded string
  260. */
  261. void insert_wstring (String value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue;
  262. /**
  263. * Inserts an Any value into the Any represented by this DynAny.
  264. *
  265. * @exception InvalidValue if this DynAny has components but has a current position of -1
  266. * @exception TypeMismatch if called on a DynAny whose current component itself has components
  267. */
  268. void insert_any (org.omg.CORBA.Any value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue;
  269. /**
  270. * Inserts the Any value contained in the parameter DynAny into the Any represented by this DynAny.
  271. *
  272. * @exception InvalidValue if this DynAny has components but has a current position of -1
  273. * @exception TypeMismatch if called on a DynAny whose current component itself has components
  274. */
  275. void insert_dyn_any (org.omg.DynamicAny.DynAny value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue;
  276. /**
  277. * Inserts a reference to a Serializable object into this DynAny.
  278. * The IDL ValueBase type is mapped to the Java Serializable type.
  279. *
  280. * @exception InvalidValue if this DynAny has components but has a current position of -1
  281. * @exception TypeMismatch if called on a DynAny whose current component itself has components
  282. */
  283. void insert_val (java.io.Serializable value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue;
  284. /**
  285. * Extracts the boolean value from this DynAny.
  286. *
  287. * @exception TypeMismatch if the accessed component in the DynAny is of a type
  288. * that is not equivalent to the requested type.
  289. * @exception TypeMismatch if called on a DynAny whose current component itself has components
  290. * @exception InvalidValue if this DynAny has components but has a current position of -1
  291. */
  292. boolean get_boolean () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue;
  293. /**
  294. * Extracts the byte value from this DynAny. The IDL octet data type is mapped to the Java byte data type.
  295. *
  296. * @exception TypeMismatch if the accessed component in the DynAny is of a type
  297. * that is not equivalent to the requested type.
  298. * @exception TypeMismatch if called on a DynAny whose current component itself has components
  299. * @exception InvalidValue if this DynAny has components but has a current position of -1
  300. */
  301. byte get_octet () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue;
  302. /**
  303. * Extracts the char value from this DynAny.
  304. *
  305. * @exception TypeMismatch if the accessed component in the DynAny is of a type
  306. * that is not equivalent to the requested type.
  307. * @exception TypeMismatch if called on a DynAny whose current component itself has components
  308. * @exception InvalidValue if this DynAny has components but has a current position of -1
  309. */
  310. char get_char () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue;
  311. /**
  312. * Extracts the short value from this DynAny.
  313. *
  314. * @exception TypeMismatch if the accessed component in the DynAny is of a type
  315. * that is not equivalent to the requested type.
  316. * @exception TypeMismatch if called on a DynAny whose current component itself has components
  317. * @exception InvalidValue if this DynAny has components but has a current position of -1
  318. */
  319. short get_short () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue;
  320. /**
  321. * Extracts the short value from this DynAny. The IDL ushort data type is mapped to the Java short data type.
  322. *
  323. * @exception TypeMismatch if the accessed component in the DynAny is of a type
  324. * that is not equivalent to the requested type.
  325. * @exception TypeMismatch if called on a DynAny whose current component itself has components
  326. * @exception InvalidValue if this DynAny has components but has a current position of -1
  327. */
  328. short get_ushort () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue;
  329. /**
  330. * Extracts the integer value from this DynAny. The IDL long data type is mapped to the Java int data type.
  331. *
  332. * @exception TypeMismatch if the accessed component in the DynAny is of a type
  333. * that is not equivalent to the requested type.
  334. * @exception TypeMismatch if called on a DynAny whose current component itself has components
  335. * @exception InvalidValue if this DynAny has components but has a current position of -1
  336. */
  337. int get_long () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue;
  338. /**
  339. * Extracts the integer value from this DynAny. The IDL ulong data type is mapped to the Java int data type.
  340. *
  341. * @exception TypeMismatch if the accessed component in the DynAny is of a type
  342. * that is not equivalent to the requested type.
  343. * @exception TypeMismatch if called on a DynAny whose current component itself has components
  344. * @exception InvalidValue if this DynAny has components but has a current position of -1
  345. */
  346. int get_ulong () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue;
  347. /**
  348. * Extracts the float value from this DynAny.
  349. *
  350. * @exception TypeMismatch if the accessed component in the DynAny is of a type
  351. * that is not equivalent to the requested type.
  352. * @exception TypeMismatch if called on a DynAny whose current component itself has components
  353. * @exception InvalidValue if this DynAny has components but has a current position of -1
  354. */
  355. float get_float () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue;
  356. /**
  357. * Extracts the double value from this DynAny.
  358. *
  359. * @exception TypeMismatch if the accessed component in the DynAny is of a type
  360. * that is not equivalent to the requested type.
  361. * @exception TypeMismatch if called on a DynAny whose current component itself has components
  362. * @exception InvalidValue if this DynAny has components but has a current position of -1
  363. */
  364. double get_double () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue;
  365. /**
  366. * Extracts the string value from this DynAny.
  367. * Both bounded and unbounded strings are extracted using this method.
  368. *
  369. * @exception TypeMismatch if the accessed component in the DynAny is of a type
  370. * that is not equivalent to the requested type.
  371. * @exception TypeMismatch if called on a DynAny whose current component itself has components
  372. * @exception InvalidValue if this DynAny has components but has a current position of -1
  373. */
  374. String get_string () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue;
  375. /**
  376. * Extracts the reference to a CORBA Object from this DynAny.
  377. *
  378. * @exception TypeMismatch if the accessed component in the DynAny is of a type
  379. * that is not equivalent to the requested type.
  380. * @exception TypeMismatch if called on a DynAny whose current component itself has components
  381. * @exception InvalidValue if this DynAny has components but has a current position of -1
  382. */
  383. org.omg.CORBA.Object get_reference () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue;
  384. /**
  385. * Extracts the TypeCode object from this DynAny.
  386. *
  387. * @exception TypeMismatch if the accessed component in the DynAny is of a type
  388. * that is not equivalent to the requested type.
  389. * @exception TypeMismatch if called on a DynAny whose current component itself has components
  390. * @exception InvalidValue if this DynAny has components but has a current position of -1
  391. */
  392. org.omg.CORBA.TypeCode get_typecode () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue;
  393. /**
  394. * Extracts the long value from this DynAny. The IDL long long data type is mapped to the Java long data type.
  395. *
  396. * @exception TypeMismatch if the accessed component in the DynAny is of a type
  397. * that is not equivalent to the requested type.
  398. * @exception TypeMismatch if called on a DynAny whose current component itself has components
  399. * @exception InvalidValue if this DynAny has components but has a current position of -1
  400. */
  401. long get_longlong () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue;
  402. /**
  403. * Extracts the long value from this DynAny.
  404. * The IDL unsigned long long data type is mapped to the Java long data type.
  405. *
  406. * @exception TypeMismatch if the accessed component in the DynAny is of a type
  407. * that is not equivalent to the requested type.
  408. * @exception TypeMismatch if called on a DynAny whose current component itself has components
  409. * @exception InvalidValue if this DynAny has components but has a current position of -1
  410. */
  411. long get_ulonglong () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue;
  412. /**
  413. * Extracts the long value from this DynAny. The IDL wchar data type is mapped to the Java char data type.
  414. *
  415. * @exception TypeMismatch if the accessed component in the DynAny is of a type
  416. * that is not equivalent to the requested type.
  417. * @exception TypeMismatch if called on a DynAny whose current component itself has components
  418. * @exception InvalidValue if this DynAny has components but has a current position of -1
  419. */
  420. char get_wchar () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue;
  421. /**
  422. * Extracts the string value from this DynAny.
  423. * Both bounded and unbounded strings are extracted using this method.
  424. *
  425. * @exception TypeMismatch if the accessed component in the DynAny is of a type
  426. * that is not equivalent to the requested type.
  427. * @exception TypeMismatch if called on a DynAny whose current component itself has components
  428. */
  429. String get_wstring () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue;
  430. /**
  431. * Extracts an Any value contained in the Any represented by this DynAny.
  432. *
  433. * @exception TypeMismatch if the accessed component in the DynAny is of a type
  434. * that is not equivalent to the requested type.
  435. * @exception TypeMismatch if called on a DynAny whose current component itself has components
  436. * @exception InvalidValue if this DynAny has components but has a current position of -1
  437. */
  438. org.omg.CORBA.Any get_any () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue;
  439. /**
  440. * Extracts the Any value contained in the Any represented by this DynAny and returns it wrapped
  441. * into a new DynAny.
  442. *
  443. * @exception TypeMismatch if the accessed component in the DynAny is of a type
  444. * that is not equivalent to the requested type.
  445. * @exception TypeMismatch if called on a DynAny whose current component itself has components
  446. * @exception InvalidValue if this DynAny has components but has a current position of -1
  447. */
  448. org.omg.DynamicAny.DynAny get_dyn_any () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue;
  449. /**
  450. * Extracts a Serializable object from this DynAny.
  451. * The IDL ValueBase type is mapped to the Java Serializable type.
  452. *
  453. * @exception TypeMismatch if the accessed component in the DynAny is of a type
  454. * that is not equivalent to the requested type.
  455. * @exception TypeMismatch if called on a DynAny whose current component itself has components
  456. * @exception InvalidValue if this DynAny has components but has a current position of -1
  457. */
  458. java.io.Serializable get_val () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue;
  459. /**
  460. * Sets the current position to index. The current position is indexed 0 to n-1, that is,
  461. * index zero corresponds to the first component. The operation returns true if the resulting
  462. * current position indicates a component of the DynAny and false if index indicates
  463. * a position that does not correspond to a component.
  464. * Calling seek with a negative index is legal. It sets the current position to -1 to indicate
  465. * no component and returns false. Passing a non-negative index value for a DynAny that does not
  466. * have a component at the corresponding position sets the current position to -1 and returns false.
  467. */
  468. boolean seek (int index);
  469. /**
  470. * Is equivalent to seek(0).
  471. */
  472. void rewind ();
  473. /**
  474. * Advances the current position to the next component.
  475. * The operation returns true while the resulting current position indicates a component, false otherwise.
  476. * A false return value leaves the current position at -1.
  477. * Invoking next on a DynAny without components leaves the current position at -1 and returns false.
  478. */
  479. boolean next ();
  480. /**
  481. * Returns the number of components of a DynAny.
  482. * For a DynAny without components, it returns zero.
  483. * The operation only counts the components at the top level.
  484. * For example, if component_count is invoked on a DynStruct with a single member,
  485. * the return value is 1, irrespective of the type of the member.
  486. * <UL>
  487. * <LI>For sequences, the operation returns the current number of elements.
  488. * <LI>For structures, exceptions, and value types, the operation returns the number of members.
  489. * <LI>For arrays, the operation returns the number of elements.
  490. * <LI>For unions, the operation returns 2 if the discriminator indicates that a named member is active,
  491. * otherwise, it returns 1.
  492. * <LI>For DynFixed and DynEnum, the operation returns zero.
  493. * </UL>
  494. */
  495. int component_count ();
  496. /**
  497. * Returns the DynAny for the component at the current position.
  498. * It does not advance the current position, so repeated calls to current_component
  499. * without an intervening call to rewind, next, or seek return the same component.
  500. * The returned DynAny object reference can be used to get/set the value of the current component.
  501. * If the current component represents a complex type, the returned reference can be narrowed
  502. * based on the TypeCode to get the interface corresponding to the to the complex type.
  503. * Calling current_component on a DynAny that cannot have components,
  504. * such as a DynEnum or an empty exception, raises TypeMismatch.
  505. * Calling current_component on a DynAny whose current position is -1 returns a nil reference.
  506. * The iteration operations, together with current_component, can be used
  507. * to dynamically compose an any value. After creating a dynamic any, such as a DynStruct,
  508. * current_component and next can be used to initialize all the components of the value.
  509. * Once the dynamic value is completely initialized, to_any creates the corresponding any value.
  510. *
  511. * @exception TypeMismatch If called on a DynAny that cannot have components,
  512. * such as a DynEnum or an empty exception
  513. */
  514. org.omg.DynamicAny.DynAny current_component () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch;
  515. } // interface DynAnyOperations