1 |
/* DynAnyOperations.java -- |
/* DynAnyOperations.java -- |
2 |
Copyright (C) 2005 Free Software Foundation, Inc. |
Copyright (C) 2005 Free Software Foundation, Inc. |
|
|
|
3 |
This file is part of GNU Classpath. |
This file is part of GNU Classpath. |
4 |
|
|
5 |
GNU Classpath is free software; you can redistribute it and/or modify |
GNU Classpath is free software; you can redistribute it and/or modify |
59 |
* @throws TypeMismatch if the source DynAny is invalid. |
* @throws TypeMismatch if the source DynAny is invalid. |
60 |
*/ |
*/ |
61 |
void assign(DynAny from) |
void assign(DynAny from) |
62 |
throws TypeMismatch, InvalidValue; |
throws TypeMismatch; |
63 |
|
|
64 |
/** |
/** |
65 |
* Fully clones the content of this Any, returning a deep copy. |
* Fully clones the content of this Any, returning a deep copy. |
72 |
* DynAny can be used to get or set the value of the focused component. If the |
* DynAny can be used to get or set the value of the focused component. If the |
73 |
* DynAny holds a primitive type with no components, this implementation |
* DynAny holds a primitive type with no components, this implementation |
74 |
* returns <code>null</code>. |
* returns <code>null</code>. |
75 |
|
* |
76 |
|
* @throws TypeMismatch if called on DynAny that cannot have active |
77 |
|
* components, like {@link DynEnum}. |
78 |
*/ |
*/ |
79 |
DynAny current_component(); |
DynAny current_component() |
80 |
|
throws TypeMismatch; |
81 |
|
|
82 |
/** |
/** |
83 |
* Destroys this DynAny, freeing the used resources. In java, resources are |
* Destroys this DynAny, freeing the used resources. In java, resources are |
98 |
* otherwise invalid. |
* otherwise invalid. |
99 |
*/ |
*/ |
100 |
void from_any(Any an_any) |
void from_any(Any an_any) |
101 |
throws TypeMismatch, InvalidValue; |
throws TypeMismatch, InvalidValue; |
102 |
|
|
103 |
/** |
/** |
104 |
* This method is used when the wrapped Any contains an instance of another |
* This method is used when the wrapped Any contains an instance of another |
108 |
* the typecode of this DynAny. |
* the typecode of this DynAny. |
109 |
*/ |
*/ |
110 |
Any get_any() |
Any get_any() |
111 |
throws TypeMismatch, InvalidValue; |
throws TypeMismatch, InvalidValue; |
112 |
|
|
113 |
/** |
/** |
114 |
* Extract the boolean value that is expected to be stored in this DynAny. |
* Extract the boolean value that is expected to be stored in this DynAny. |
116 |
* @throws TypeMismatch if this DynAny holds the value of the different type. |
* @throws TypeMismatch if this DynAny holds the value of the different type. |
117 |
*/ |
*/ |
118 |
boolean get_boolean() |
boolean get_boolean() |
119 |
throws TypeMismatch, InvalidValue; |
throws TypeMismatch, InvalidValue; |
120 |
|
|
121 |
/** |
/** |
122 |
* Extract the char value that is expected to be stored in this DynAny. |
* Extract the char value that is expected to be stored in this DynAny. |
124 |
* @throws TypeMismatch if this DynAny holds the value of the different type. |
* @throws TypeMismatch if this DynAny holds the value of the different type. |
125 |
*/ |
*/ |
126 |
char get_char() |
char get_char() |
127 |
throws TypeMismatch, InvalidValue; |
throws TypeMismatch, InvalidValue; |
128 |
|
|
129 |
/** |
/** |
130 |
* Extract the <code>double</code> value that is expected to be stored in |
* Extract the <code>double</code> value that is expected to be stored in |
133 |
* @throws TypeMismatch if this DynAny holds the value of the different type. |
* @throws TypeMismatch if this DynAny holds the value of the different type. |
134 |
*/ |
*/ |
135 |
double get_double() |
double get_double() |
136 |
throws TypeMismatch, InvalidValue; |
throws TypeMismatch, InvalidValue; |
137 |
|
|
138 |
/** |
/** |
139 |
* Extract the <code>float</code> value that is expected to be stored in |
* Extract the <code>float</code> value that is expected to be stored in |
142 |
* @throws TypeMismatch if this DynAny holds the value of the different type. |
* @throws TypeMismatch if this DynAny holds the value of the different type. |
143 |
*/ |
*/ |
144 |
float get_float() |
float get_float() |
145 |
throws TypeMismatch, InvalidValue; |
throws TypeMismatch, InvalidValue; |
146 |
|
|
147 |
/** |
/** |
148 |
* Extract the int (CORBA long) value that is expected to be stored in this |
* Extract the int (CORBA long) value that is expected to be stored in this |
151 |
* @throws TypeMismatch if this DynAny holds the value of the different type. |
* @throws TypeMismatch if this DynAny holds the value of the different type. |
152 |
*/ |
*/ |
153 |
int get_long() |
int get_long() |
154 |
throws TypeMismatch, InvalidValue; |
throws TypeMismatch, InvalidValue; |
155 |
|
|
156 |
/** |
/** |
157 |
* Extract the long (CORBA long long) value that is expected to be stored in |
* Extract the long (CORBA long long) value that is expected to be stored in |
160 |
* @throws TypeMismatch if this DynAny holds the value of the different type. |
* @throws TypeMismatch if this DynAny holds the value of the different type. |
161 |
*/ |
*/ |
162 |
long get_longlong() |
long get_longlong() |
163 |
throws TypeMismatch, InvalidValue; |
throws TypeMismatch, InvalidValue; |
164 |
|
|
165 |
/** |
/** |
166 |
* Extract the byte (CORBA octet) value that is expected to be stored in this |
* Extract the byte (CORBA octet) value that is expected to be stored in this |
169 |
* @throws TypeMismatch if this DynAny holds the value of the different type. |
* @throws TypeMismatch if this DynAny holds the value of the different type. |
170 |
*/ |
*/ |
171 |
byte get_octet() |
byte get_octet() |
172 |
throws TypeMismatch, InvalidValue; |
throws TypeMismatch, InvalidValue; |
173 |
|
|
174 |
/** |
/** |
175 |
* Extract the CORBA object reference that is expected to be stored in this |
* Extract the CORBA object reference that is expected to be stored in this |
178 |
* @throws TypeMismatch if this DynAny holds the value of the different type. |
* @throws TypeMismatch if this DynAny holds the value of the different type. |
179 |
*/ |
*/ |
180 |
org.omg.CORBA.Object get_reference() |
org.omg.CORBA.Object get_reference() |
181 |
throws TypeMismatch, InvalidValue; |
throws TypeMismatch, InvalidValue; |
182 |
|
|
183 |
/** |
/** |
184 |
* Extract the <code>short</code> value that is expected to be stored in |
* Extract the <code>short</code> value that is expected to be stored in |
187 |
* @throws TypeMismatch if this DynAny holds the value of the different type. |
* @throws TypeMismatch if this DynAny holds the value of the different type. |
188 |
*/ |
*/ |
189 |
short get_short() |
short get_short() |
190 |
throws TypeMismatch, InvalidValue; |
throws TypeMismatch, InvalidValue; |
191 |
|
|
192 |
/** |
/** |
193 |
* Extract the string value that is expected to be stored in this DynAny. |
* Extract the string value that is expected to be stored in this DynAny. |
195 |
* @throws TypeMismatch if this DynAny holds the value of the different type. |
* @throws TypeMismatch if this DynAny holds the value of the different type. |
196 |
*/ |
*/ |
197 |
String get_string() |
String get_string() |
198 |
throws TypeMismatch, InvalidValue; |
throws TypeMismatch, InvalidValue; |
199 |
|
|
200 |
/** |
/** |
201 |
* Extract the {@link TypeCode} value that is expected to be stored in this |
* Extract the {@link TypeCode} value that is expected to be stored in this |
204 |
* @throws TypeMismatch if this DynAny holds the value of the different type. |
* @throws TypeMismatch if this DynAny holds the value of the different type. |
205 |
*/ |
*/ |
206 |
TypeCode get_typecode() |
TypeCode get_typecode() |
207 |
throws TypeMismatch, InvalidValue; |
throws TypeMismatch, InvalidValue; |
208 |
|
|
209 |
/** |
/** |
210 |
* Extract the unsigned int (CORBA ulong) value that is expected to be stored |
* Extract the unsigned int (CORBA ulong) value that is expected to be stored |
213 |
* @throws TypeMismatch if this DynAny holds the value of the different type. |
* @throws TypeMismatch if this DynAny holds the value of the different type. |
214 |
*/ |
*/ |
215 |
int get_ulong() |
int get_ulong() |
216 |
throws TypeMismatch, InvalidValue; |
throws TypeMismatch, InvalidValue; |
217 |
|
|
218 |
/** |
/** |
219 |
* Extract the unsingel long (CORBA unsigned long long )value that is expected |
* Extract the unsingel long (CORBA unsigned long long )value that is expected |
222 |
* @throws TypeMismatch if this DynAny holds the value of the different type. |
* @throws TypeMismatch if this DynAny holds the value of the different type. |
223 |
*/ |
*/ |
224 |
long get_ulonglong() |
long get_ulonglong() |
225 |
throws TypeMismatch, InvalidValue; |
throws TypeMismatch, InvalidValue; |
226 |
|
|
227 |
/** |
/** |
228 |
* Extract the unsigned short value that is expected to be stored in this |
* Extract the unsigned short value that is expected to be stored in this |
231 |
* @throws TypeMismatch if this DynAny holds the value of the different type. |
* @throws TypeMismatch if this DynAny holds the value of the different type. |
232 |
*/ |
*/ |
233 |
short get_ushort() |
short get_ushort() |
234 |
throws TypeMismatch, InvalidValue; |
throws TypeMismatch, InvalidValue; |
235 |
|
|
236 |
/** |
/** |
237 |
* Extract the value that is expected to be stored in this DynAny. |
* Extract the value that is expected to be stored in this DynAny. |
239 |
* @throws TypeMismatch if this DynAny holds the value of the different type. |
* @throws TypeMismatch if this DynAny holds the value of the different type. |
240 |
*/ |
*/ |
241 |
Serializable get_val() |
Serializable get_val() |
242 |
throws TypeMismatch, InvalidValue; |
throws TypeMismatch, InvalidValue; |
243 |
|
|
244 |
/** |
/** |
245 |
* Extract the wide (usually UTF-16) character value that is expected to be |
* Extract the wide (usually UTF-16) character value that is expected to be |
248 |
* @throws TypeMismatch if this DynAny holds the value of the different type. |
* @throws TypeMismatch if this DynAny holds the value of the different type. |
249 |
*/ |
*/ |
250 |
char get_wchar() |
char get_wchar() |
251 |
throws TypeMismatch, InvalidValue; |
throws TypeMismatch, InvalidValue; |
252 |
|
|
253 |
/** |
/** |
254 |
* Extract the wide (usually UFT-16) string that is expected to be stored in |
* Extract the wide (usually UFT-16) string that is expected to be stored in |
257 |
* @throws TypeMismatch if this DynAny holds the value of the different type. |
* @throws TypeMismatch if this DynAny holds the value of the different type. |
258 |
*/ |
*/ |
259 |
String get_wstring() |
String get_wstring() |
260 |
throws TypeMismatch, InvalidValue; |
throws TypeMismatch, InvalidValue; |
261 |
|
|
262 |
/** |
/** |
263 |
* Insert the {@link Any} value into the enclosed {@link Any} inside this |
* Insert the {@link Any} value into the enclosed {@link Any} inside this |
268 |
* enclosed {@link Any}. |
* enclosed {@link Any}. |
269 |
*/ |
*/ |
270 |
void insert_any(Any an_any) |
void insert_any(Any an_any) |
271 |
throws TypeMismatch, InvalidValue; |
throws TypeMismatch, InvalidValue; |
272 |
|
|
273 |
/** |
/** |
274 |
* Insert the boolean value into the enclosed {@link Any} inside this DynAny |
* Insert the boolean value into the enclosed {@link Any} inside this DynAny |
278 |
* enclosed {@link Any}. |
* enclosed {@link Any}. |
279 |
*/ |
*/ |
280 |
void insert_boolean(boolean a_x) |
void insert_boolean(boolean a_x) |
281 |
throws InvalidValue, TypeMismatch; |
throws InvalidValue, TypeMismatch; |
282 |
|
|
283 |
/** |
/** |
284 |
* Insert the char value into the enclosed {@link Any} inside this DynAny |
* Insert the char value into the enclosed {@link Any} inside this DynAny |
288 |
* enclosed {@link Any}. |
* enclosed {@link Any}. |
289 |
*/ |
*/ |
290 |
void insert_char(char a_x) |
void insert_char(char a_x) |
291 |
throws InvalidValue, TypeMismatch; |
throws InvalidValue, TypeMismatch; |
292 |
|
|
293 |
/** |
/** |
294 |
* Insert the double value into the enclosed {@link Any} inside this DynAny |
* Insert the double value into the enclosed {@link Any} inside this DynAny |
298 |
* enclosed {@link Any}. |
* enclosed {@link Any}. |
299 |
*/ |
*/ |
300 |
void insert_double(double a_x) |
void insert_double(double a_x) |
301 |
throws InvalidValue, TypeMismatch; |
throws InvalidValue, TypeMismatch; |
302 |
|
|
303 |
/** |
/** |
304 |
* Insert the float value into the enclosed {@link Any} inside this DynAny |
* Insert the float value into the enclosed {@link Any} inside this DynAny |
308 |
* enclosed {@link Any}. |
* enclosed {@link Any}. |
309 |
*/ |
*/ |
310 |
void insert_float(float a_x) |
void insert_float(float a_x) |
311 |
throws InvalidValue, TypeMismatch; |
throws InvalidValue, TypeMismatch; |
312 |
|
|
313 |
/** |
/** |
314 |
* Insert the int (CORBA long) value into the enclosed {@link Any} inside this |
* Insert the int (CORBA long) value into the enclosed {@link Any} inside this |
319 |
* enclosed {@link Any}. |
* enclosed {@link Any}. |
320 |
*/ |
*/ |
321 |
void insert_long(int a_x) |
void insert_long(int a_x) |
322 |
throws InvalidValue, TypeMismatch; |
throws InvalidValue, TypeMismatch; |
323 |
|
|
324 |
/** |
/** |
325 |
* Insert the long (CORBA long long) value into the enclosed {@link Any} |
* Insert the long (CORBA long long) value into the enclosed {@link Any} |
330 |
* enclosed {@link Any}. |
* enclosed {@link Any}. |
331 |
*/ |
*/ |
332 |
void insert_longlong(long a_x) |
void insert_longlong(long a_x) |
333 |
throws InvalidValue, TypeMismatch; |
throws InvalidValue, TypeMismatch; |
334 |
|
|
335 |
/** |
/** |
336 |
* Insert the byte (CORBA octet) value into the enclosed {@link Any} inside |
* Insert the byte (CORBA octet) value into the enclosed {@link Any} inside |
341 |
* enclosed {@link Any}. |
* enclosed {@link Any}. |
342 |
*/ |
*/ |
343 |
void insert_octet(byte a_x) |
void insert_octet(byte a_x) |
344 |
throws InvalidValue, TypeMismatch; |
throws InvalidValue, TypeMismatch; |
345 |
|
|
346 |
/** |
/** |
347 |
* Insert the object reference into the enclosed {@link Any} inside this |
* Insert the object reference into the enclosed {@link Any} inside this |
352 |
* enclosed {@link Any}. |
* enclosed {@link Any}. |
353 |
*/ |
*/ |
354 |
void insert_reference(org.omg.CORBA.Object a_x) |
void insert_reference(org.omg.CORBA.Object a_x) |
355 |
throws InvalidValue, TypeMismatch; |
throws InvalidValue, TypeMismatch; |
356 |
|
|
357 |
/** |
/** |
358 |
* Insert the <code>short</code> value into the enclosed {@link Any} inside |
* Insert the <code>short</code> value into the enclosed {@link Any} inside |
363 |
* enclosed {@link Any}. |
* enclosed {@link Any}. |
364 |
*/ |
*/ |
365 |
void insert_short(short a_x) |
void insert_short(short a_x) |
366 |
throws InvalidValue, TypeMismatch; |
throws InvalidValue, TypeMismatch; |
367 |
|
|
368 |
/** |
/** |
369 |
* Insert the string value into the enclosed {@link Any} inside this DynAny |
* Insert the string value into the enclosed {@link Any} inside this DynAny |
373 |
* enclosed {@link Any}. |
* enclosed {@link Any}. |
374 |
*/ |
*/ |
375 |
void insert_string(String a_x) |
void insert_string(String a_x) |
376 |
throws InvalidValue, TypeMismatch; |
throws InvalidValue, TypeMismatch; |
377 |
|
|
378 |
/** |
/** |
379 |
* Insert the {@link TypeCode} value into the enclosed {@link Any} inside this |
* Insert the {@link TypeCode} value into the enclosed {@link Any} inside this |
384 |
* enclosed {@link Any}. |
* enclosed {@link Any}. |
385 |
*/ |
*/ |
386 |
void insert_typecode(TypeCode a_x) |
void insert_typecode(TypeCode a_x) |
387 |
throws InvalidValue, TypeMismatch; |
throws InvalidValue, TypeMismatch; |
388 |
|
|
389 |
/** |
/** |
390 |
* Insert the int (CORBA unsinged long) value into the enclosed {@link Any} |
* Insert the int (CORBA unsinged long) value into the enclosed {@link Any} |
395 |
* enclosed {@link Any}. |
* enclosed {@link Any}. |
396 |
*/ |
*/ |
397 |
void insert_ulong(int a_x) |
void insert_ulong(int a_x) |
398 |
throws InvalidValue, TypeMismatch; |
throws InvalidValue, TypeMismatch; |
399 |
|
|
400 |
/** |
/** |
401 |
* Insert the long (CORBA unsigned long long) value into the enclosed |
* Insert the long (CORBA unsigned long long) value into the enclosed |
406 |
* enclosed {@link Any}. |
* enclosed {@link Any}. |
407 |
*/ |
*/ |
408 |
void insert_ulonglong(long a_x) |
void insert_ulonglong(long a_x) |
409 |
throws InvalidValue, TypeMismatch; |
throws InvalidValue, TypeMismatch; |
410 |
|
|
411 |
/** |
/** |
412 |
* Insert the short (CORBA unsigned short) value into the enclosed {@link Any} |
* Insert the short (CORBA unsigned short) value into the enclosed {@link Any} |
417 |
* enclosed {@link Any}. |
* enclosed {@link Any}. |
418 |
*/ |
*/ |
419 |
void insert_ushort(short a_x) |
void insert_ushort(short a_x) |
420 |
throws InvalidValue, TypeMismatch; |
throws InvalidValue, TypeMismatch; |
421 |
|
|
422 |
/** |
/** |
423 |
* Insert the value into the enclosed {@link Any} inside this DynAny |
* Insert the value into the enclosed {@link Any} inside this DynAny |
427 |
* enclosed {@link Any}. |
* enclosed {@link Any}. |
428 |
*/ |
*/ |
429 |
void insert_val(Serializable a_x) |
void insert_val(Serializable a_x) |
430 |
throws InvalidValue, TypeMismatch; |
throws InvalidValue, TypeMismatch; |
431 |
|
|
432 |
/** |
/** |
433 |
* Insert the wide char (usually UTF-16) value into the enclosed {@link Any} |
* Insert the wide char (usually UTF-16) value into the enclosed {@link Any} |
438 |
* enclosed {@link Any}. |
* enclosed {@link Any}. |
439 |
*/ |
*/ |
440 |
void insert_wchar(char a_x) |
void insert_wchar(char a_x) |
441 |
throws InvalidValue, TypeMismatch; |
throws InvalidValue, TypeMismatch; |
442 |
|
|
443 |
/** |
/** |
444 |
* Insert the wide string (usually UTF-16) into the enclosed {@link Any} |
* Insert the wide string (usually UTF-16) into the enclosed {@link Any} |
449 |
* enclosed {@link Any}. |
* enclosed {@link Any}. |
450 |
*/ |
*/ |
451 |
void insert_wstring(String a_x) |
void insert_wstring(String a_x) |
452 |
throws InvalidValue, TypeMismatch; |
throws InvalidValue, TypeMismatch; |
453 |
|
|
454 |
/** |
/** |
455 |
* Advances the internal pointer, described in the {@link current_component}, |
* Advances the internal pointer, described in the {@link current_component}, |
484 |
* |
* |
485 |
* @return shallow copy of the enclosed {@link Any}. |
* @return shallow copy of the enclosed {@link Any}. |
486 |
*/ |
*/ |
487 |
Any to_any() |
Any to_any(); |
|
throws TypeMismatch; |
|
488 |
|
|
489 |
/** |
/** |
490 |
* Returns the typecode of the object, inserted into this DynAny. |
* Returns the typecode of the object, inserted into this DynAny. |
503 |
* @throws InvalidValue if the current position points nowhere. |
* @throws InvalidValue if the current position points nowhere. |
504 |
*/ |
*/ |
505 |
void insert_dyn_any(DynAny insert_it) |
void insert_dyn_any(DynAny insert_it) |
506 |
throws TypeMismatch, InvalidValue; |
throws TypeMismatch, InvalidValue; |
507 |
|
|
508 |
/** |
/** |
509 |
* Checks for equality with another Dynamic Any. |
* Checks for equality with another Dynamic Any. |
510 |
* |
* |
511 |
* |
* |
512 |
* @specnote This method is currently only implemented only for case when |
* @specnote This method is currently only implemented only for case when |
513 |
* another DynAny was created by the factory of this implementation and |
* another DynAny was created by the factory of this implementation and is not |
514 |
* is not an independent class, just implementing interface. Otherwise, |
* an independent class, just implementing interface. Otherwise, a |
515 |
* a NO_IMPLEMENT minor 8148 will be thrown. General implementation is |
* NO_IMPLEMENT minor 8148 will be thrown. General implementation is highly |
516 |
* highly ineffective, but we will do if somebody would ever need it. |
* ineffective, but we will do if somebody would ever need it. |
517 |
*/ |
*/ |
518 |
boolean equal(DynAny other); |
boolean equal(DynAny other); |
519 |
|
|
536 |
* @throws InvalidValue if the current position points nowhere. |
* @throws InvalidValue if the current position points nowhere. |
537 |
*/ |
*/ |
538 |
DynAny get_dyn_any() |
DynAny get_dyn_any() |
539 |
throws TypeMismatch, InvalidValue; |
throws TypeMismatch, InvalidValue; |
540 |
} |
} |