KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > corba > se > impl > dynamicany > DynAnyBasicImpl


1 /*
2  * @(#)DynAnyBasicImpl.java 1.9 03/12/19
3  *
4  * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
5  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
6  */

7
8 package com.sun.corba.se.impl.dynamicany;
9
10 import org.omg.CORBA.Any JavaDoc;
11 import org.omg.CORBA.TypeCode JavaDoc;
12 import org.omg.CORBA.TypeCodePackage.BadKind JavaDoc;
13 import org.omg.CORBA.TCKind JavaDoc;
14
15 import org.omg.DynamicAny.*;
16 import org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc;
17 import org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc;
18 import org.omg.DynamicAny.DynAnyFactoryPackage.InconsistentTypeCode JavaDoc;
19
20 import com.sun.corba.se.spi.orb.ORB ;
21 import com.sun.corba.se.spi.logging.CORBALogDomains ;
22 import com.sun.corba.se.impl.logging.ORBUtilSystemException ;
23
24 public class DynAnyBasicImpl extends DynAnyImpl
25 {
26     //
27
// Constructors
28
//
29

30     private DynAnyBasicImpl() {
31         this(null, (Any JavaDoc)null, false);
32     }
33
34     protected DynAnyBasicImpl(ORB orb, Any JavaDoc any, boolean copyValue) {
35         super(orb, any, copyValue);
36         // set the current position to 0 if any has components, otherwise to -1.
37
index = NO_INDEX;
38     }
39
40     protected DynAnyBasicImpl(ORB orb, TypeCode JavaDoc typeCode) {
41         super(orb, typeCode);
42         // set the current position to 0 if any has components, otherwise to -1.
43
index = NO_INDEX;
44     }
45
46     //
47
// DynAny interface methods
48
//
49

50     public void assign (org.omg.DynamicAny.DynAny JavaDoc dyn_any)
51         throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc
52     {
53         if (status == STATUS_DESTROYED) {
54         throw wrapper.dynAnyDestroyed() ;
55         }
56         super.assign(dyn_any);
57         index = NO_INDEX;
58     }
59
60     public void from_any (org.omg.CORBA.Any JavaDoc value)
61         throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc,
62                org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
63     {
64         if (status == STATUS_DESTROYED) {
65         throw wrapper.dynAnyDestroyed() ;
66         }
67         super.from_any(value);
68         index = NO_INDEX;
69     }
70
71     // Spec: Returns a copy of the internal Any
72
public org.omg.CORBA.Any JavaDoc to_any() {
73         if (status == STATUS_DESTROYED) {
74         throw wrapper.dynAnyDestroyed() ;
75         }
76     return DynAnyUtil.copy(any, orb);
77     }
78
79     public boolean equal (org.omg.DynamicAny.DynAny JavaDoc dyn_any) {
80         if (status == STATUS_DESTROYED) {
81         throw wrapper.dynAnyDestroyed() ;
82         }
83         if (dyn_any == this) {
84             return true;
85         }
86         // If the other DynAny is a constructed one we don't want it to have
87
// to create its Any representation just for this test.
88
if ( ! any.type().equal(dyn_any.type())) {
89             return false;
90         }
91         //System.out.println("Comparing anys");
92
return any.equal(getAny(dyn_any));
93     }
94
95     public void destroy() {
96         if (status == STATUS_DESTROYED) {
97         throw wrapper.dynAnyDestroyed() ;
98         }
99         if (status == STATUS_DESTROYABLE) {
100             status = STATUS_DESTROYED;
101         }
102     }
103
104     public org.omg.DynamicAny.DynAny JavaDoc copy() {
105         if (status == STATUS_DESTROYED) {
106         throw wrapper.dynAnyDestroyed() ;
107         }
108         // The flag "true" indicates copying the Any value
109
try {
110             return DynAnyUtil.createMostDerivedDynAny(any, orb, true);
111         } catch (InconsistentTypeCode JavaDoc ictc) {
112             return null; // impossible
113
}
114     }
115
116     public org.omg.DynamicAny.DynAny JavaDoc current_component()
117         throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc
118     {
119     return null;
120     }
121
122     public int component_count() {
123     return 0;
124     }
125
126     public boolean next() {
127     return false;
128     }
129
130     public boolean seek(int index) {
131     return false;
132     }
133
134     public void rewind() {
135     }
136
137     public void insert_boolean(boolean value)
138         throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc,
139                org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
140     {
141         if (status == STATUS_DESTROYED) {
142         throw wrapper.dynAnyDestroyed() ;
143         }
144         if (any.type().kind().value() != TCKind._tk_boolean)
145             throw new TypeMismatch JavaDoc();
146         any.insert_boolean(value);
147     }
148
149     public void insert_octet(byte value)
150         throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc,
151                org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
152     {
153         if (status == STATUS_DESTROYED) {
154         throw wrapper.dynAnyDestroyed() ;
155         }
156         if (any.type().kind().value() != TCKind._tk_octet)
157             throw new TypeMismatch JavaDoc();
158         any.insert_octet(value);
159     }
160
161     public void insert_char(char value)
162         throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc,
163                org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
164     {
165         if (status == STATUS_DESTROYED) {
166         throw wrapper.dynAnyDestroyed() ;
167         }
168         if (any.type().kind().value() != TCKind._tk_char)
169             throw new TypeMismatch JavaDoc();
170         any.insert_char(value);
171     }
172
173     public void insert_short(short value)
174         throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc,
175                org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
176     {
177         if (status == STATUS_DESTROYED) {
178         throw wrapper.dynAnyDestroyed() ;
179         }
180         if (any.type().kind().value() != TCKind._tk_short)
181             throw new TypeMismatch JavaDoc();
182         any.insert_short(value);
183     }
184
185     public void insert_ushort(short value)
186         throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc,
187                org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
188     {
189         if (status == STATUS_DESTROYED) {
190         throw wrapper.dynAnyDestroyed() ;
191         }
192         if (any.type().kind().value() != TCKind._tk_ushort)
193             throw new TypeMismatch JavaDoc();
194         any.insert_ushort(value);
195     }
196
197     public void insert_long(int value)
198         throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc,
199                org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
200     {
201         if (status == STATUS_DESTROYED) {
202         throw wrapper.dynAnyDestroyed() ;
203         }
204         if (any.type().kind().value() != TCKind._tk_long)
205             throw new TypeMismatch JavaDoc();
206         any.insert_long(value);
207     }
208
209     public void insert_ulong(int value)
210         throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc,
211                org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
212     {
213         if (status == STATUS_DESTROYED) {
214         throw wrapper.dynAnyDestroyed() ;
215         }
216         if (any.type().kind().value() != TCKind._tk_ulong)
217             throw new TypeMismatch JavaDoc();
218         any.insert_ulong(value);
219     }
220
221     public void insert_float(float value)
222         throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc,
223                org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
224     {
225         if (status == STATUS_DESTROYED) {
226         throw wrapper.dynAnyDestroyed() ;
227         }
228         if (any.type().kind().value() != TCKind._tk_float)
229             throw new TypeMismatch JavaDoc();
230         any.insert_float(value);
231     }
232
233     public void insert_double(double value)
234         throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc,
235                org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
236     {
237         if (status == STATUS_DESTROYED) {
238         throw wrapper.dynAnyDestroyed() ;
239         }
240         if (any.type().kind().value() != TCKind._tk_double)
241             throw new TypeMismatch JavaDoc();
242         any.insert_double(value);
243     }
244
245     public void insert_string(String JavaDoc value)
246         throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc,
247                org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
248     {
249         if (status == STATUS_DESTROYED) {
250         throw wrapper.dynAnyDestroyed() ;
251         }
252         if (any.type().kind().value() != TCKind._tk_string)
253             throw new TypeMismatch JavaDoc();
254         if (value == null)
255             throw new InvalidValue JavaDoc();
256         // Throw InvalidValue if this is a bounded string and the length is exceeded
257
try {
258             if (any.type().length() > 0 && any.type().length() < value.length())
259                 throw new InvalidValue JavaDoc();
260         } catch (BadKind JavaDoc bad) { // impossible
261
}
262         any.insert_string(value);
263     }
264
265     public void insert_reference(org.omg.CORBA.Object JavaDoc value)
266         throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc,
267                org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
268     {
269         if (status == STATUS_DESTROYED) {
270         throw wrapper.dynAnyDestroyed() ;
271         }
272         if (any.type().kind().value() != TCKind._tk_objref)
273             throw new TypeMismatch JavaDoc();
274         any.insert_Object(value);
275     }
276
277     public void insert_typecode(org.omg.CORBA.TypeCode JavaDoc value)
278         throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc,
279                org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
280     {
281         if (status == STATUS_DESTROYED) {
282         throw wrapper.dynAnyDestroyed() ;
283         }
284         if (any.type().kind().value() != TCKind._tk_TypeCode)
285             throw new TypeMismatch JavaDoc();
286         any.insert_TypeCode(value);
287     }
288
289     public void insert_longlong(long value)
290         throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc,
291                org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
292     {
293         if (status == STATUS_DESTROYED) {
294         throw wrapper.dynAnyDestroyed() ;
295         }
296         if (any.type().kind().value() != TCKind._tk_longlong)
297             throw new TypeMismatch JavaDoc();
298         any.insert_longlong(value);
299     }
300
301     public void insert_ulonglong(long value)
302         throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc,
303                org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
304     {
305         if (status == STATUS_DESTROYED) {
306         throw wrapper.dynAnyDestroyed() ;
307         }
308         if (any.type().kind().value() != TCKind._tk_ulonglong)
309             throw new TypeMismatch JavaDoc();
310         any.insert_ulonglong(value);
311     }
312
313     public void insert_wchar(char value)
314         throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc,
315                org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
316     {
317         if (status == STATUS_DESTROYED) {
318         throw wrapper.dynAnyDestroyed() ;
319         }
320         if (any.type().kind().value() != TCKind._tk_wchar)
321             throw new TypeMismatch JavaDoc();
322         any.insert_wchar(value);
323     }
324
325     public void insert_wstring(String JavaDoc value)
326         throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc,
327                org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
328     {
329         if (status == STATUS_DESTROYED) {
330         throw wrapper.dynAnyDestroyed() ;
331         }
332         if (any.type().kind().value() != TCKind._tk_wstring)
333             throw new TypeMismatch JavaDoc();
334         if (value == null)
335             throw new InvalidValue JavaDoc();
336         // Throw InvalidValue if this is a bounded string and the length is exceeded
337
try {
338             if (any.type().length() > 0 && any.type().length() < value.length())
339                 throw new InvalidValue JavaDoc();
340         } catch (BadKind JavaDoc bad) { // impossible
341
}
342         any.insert_wstring(value);
343     }
344
345     public void insert_any(org.omg.CORBA.Any JavaDoc value)
346         throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc,
347                org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
348     {
349         if (status == STATUS_DESTROYED) {
350         throw wrapper.dynAnyDestroyed() ;
351         }
352         if (any.type().kind().value() != TCKind._tk_any)
353             throw new TypeMismatch JavaDoc();
354         any.insert_any(value);
355     }
356
357     public void insert_dyn_any (org.omg.DynamicAny.DynAny JavaDoc value)
358         throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc,
359                org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
360     {
361         if (status == STATUS_DESTROYED) {
362         throw wrapper.dynAnyDestroyed() ;
363         }
364         if (any.type().kind().value() != TCKind._tk_any)
365             throw new TypeMismatch JavaDoc();
366         // _REVISIT_ Copy value here?
367
any.insert_any(value.to_any());
368     }
369     
370     public void insert_val(java.io.Serializable JavaDoc value)
371         throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc,
372                org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
373     {
374         if (status == STATUS_DESTROYED) {
375         throw wrapper.dynAnyDestroyed() ;
376         }
377         int kind = any.type().kind().value();
378         if (kind != TCKind._tk_value && kind != TCKind._tk_value_box)
379             throw new TypeMismatch JavaDoc();
380         any.insert_Value(value);
381     }
382
383     public java.io.Serializable JavaDoc get_val()
384         throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc,
385                org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
386     {
387         if (status == STATUS_DESTROYED) {
388         throw wrapper.dynAnyDestroyed() ;
389         }
390         int kind = any.type().kind().value();
391         if (kind != TCKind._tk_value && kind != TCKind._tk_value_box)
392             throw new TypeMismatch JavaDoc();
393         return any.extract_Value();
394     }
395
396     public boolean get_boolean()
397         throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc,
398                org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
399     {
400         if (status == STATUS_DESTROYED) {
401         throw wrapper.dynAnyDestroyed() ;
402         }
403         if (any.type().kind().value() != TCKind._tk_boolean)
404             throw new TypeMismatch JavaDoc();
405         return any.extract_boolean();
406     }
407
408     public byte get_octet()
409         throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc,
410                org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
411     {
412         if (status == STATUS_DESTROYED) {
413         throw wrapper.dynAnyDestroyed() ;
414         }
415         if (any.type().kind().value() != TCKind._tk_octet)
416             throw new TypeMismatch JavaDoc();
417         return any.extract_octet();
418     }
419
420     public char get_char()
421         throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc,
422                org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
423     {
424         if (status == STATUS_DESTROYED) {
425         throw wrapper.dynAnyDestroyed() ;
426         }
427         if (any.type().kind().value() != TCKind._tk_char)
428             throw new TypeMismatch JavaDoc();
429         return any.extract_char();
430     }
431
432     public short get_short()
433         throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc,
434                org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
435     {
436         if (status == STATUS_DESTROYED) {
437         throw wrapper.dynAnyDestroyed() ;
438         }
439         if (any.type().kind().value() != TCKind._tk_short)
440             throw new TypeMismatch JavaDoc();
441         return any.extract_short();
442     }
443
444     public short get_ushort()
445         throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc,
446                org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
447     {
448         if (status == STATUS_DESTROYED) {
449         throw wrapper.dynAnyDestroyed() ;
450         }
451         if (any.type().kind().value() != TCKind._tk_ushort)
452             throw new TypeMismatch JavaDoc();
453         return any.extract_ushort();
454     }
455
456     public int get_long()
457         throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc,
458                org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
459     {
460         if (status == STATUS_DESTROYED) {
461         throw wrapper.dynAnyDestroyed() ;
462         }
463         if (any.type().kind().value() != TCKind._tk_long)
464             throw new TypeMismatch JavaDoc();
465         return any.extract_long();
466     }
467
468     public int get_ulong()
469         throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc,
470                org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
471     {
472         if (status == STATUS_DESTROYED) {
473         throw wrapper.dynAnyDestroyed() ;
474         }
475         if (any.type().kind().value() != TCKind._tk_ulong)
476             throw new TypeMismatch JavaDoc();
477         return any.extract_ulong();
478     }
479
480     public float get_float()
481         throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc,
482                org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
483     {
484         if (status == STATUS_DESTROYED) {
485         throw wrapper.dynAnyDestroyed() ;
486         }
487         if (any.type().kind().value() != TCKind._tk_float)
488             throw new TypeMismatch JavaDoc();
489         return any.extract_float();
490     }
491
492     public double get_double()
493         throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc,
494                org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
495     {
496         if (status == STATUS_DESTROYED) {
497         throw wrapper.dynAnyDestroyed() ;
498         }
499         if (any.type().kind().value() != TCKind._tk_double)
500             throw new TypeMismatch JavaDoc();
501         return any.extract_double();
502     }
503
504     public String JavaDoc get_string()
505         throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc,
506                org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
507     {
508         if (status == STATUS_DESTROYED) {
509         throw wrapper.dynAnyDestroyed() ;
510         }
511         if (any.type().kind().value() != TCKind._tk_string)
512             throw new TypeMismatch JavaDoc();
513         return any.extract_string();
514     }
515
516     public org.omg.CORBA.Object JavaDoc get_reference()
517         throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc,
518                org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
519     {
520         if (status == STATUS_DESTROYED) {
521         throw wrapper.dynAnyDestroyed() ;
522         }
523         if (any.type().kind().value() != TCKind._tk_objref)
524             throw new TypeMismatch JavaDoc();
525         return any.extract_Object();
526     }
527
528     public org.omg.CORBA.TypeCode JavaDoc get_typecode()
529         throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc,
530                org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
531     {
532         if (status == STATUS_DESTROYED) {
533         throw wrapper.dynAnyDestroyed() ;
534         }
535         if (any.type().kind().value() != TCKind._tk_TypeCode)
536             throw new TypeMismatch JavaDoc();
537         return any.extract_TypeCode();
538     }
539
540     public long get_longlong()
541         throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc,
542                org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
543     {
544         if (status == STATUS_DESTROYED) {
545         throw wrapper.dynAnyDestroyed() ;
546         }
547         if (any.type().kind().value() != TCKind._tk_longlong)
548             throw new TypeMismatch JavaDoc();
549         return any.extract_longlong();
550     }
551
552     public long get_ulonglong()
553         throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc,
554                org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
555     {
556         if (status == STATUS_DESTROYED) {
557         throw wrapper.dynAnyDestroyed() ;
558         }
559         if (any.type().kind().value() != TCKind._tk_ulonglong)
560             throw new TypeMismatch JavaDoc();
561         return any.extract_ulonglong();
562     }
563
564     public char get_wchar()
565         throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc,
566                org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
567     {
568         if (status == STATUS_DESTROYED) {
569         throw wrapper.dynAnyDestroyed() ;
570         }
571         if (any.type().kind().value() != TCKind._tk_wchar)
572             throw new TypeMismatch JavaDoc();
573         return any.extract_wchar();
574     }
575
576     public String JavaDoc get_wstring()
577         throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc,
578                org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
579     {
580         if (status == STATUS_DESTROYED) {
581         throw wrapper.dynAnyDestroyed() ;
582         }
583         if (any.type().kind().value() != TCKind._tk_wstring)
584             throw new TypeMismatch JavaDoc();
585         return any.extract_wstring();
586     }
587
588     public org.omg.CORBA.Any JavaDoc get_any()
589         throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc,
590                org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
591     {
592         if (status == STATUS_DESTROYED) {
593         throw wrapper.dynAnyDestroyed() ;
594         }
595         if (any.type().kind().value() != TCKind._tk_any)
596             throw new TypeMismatch JavaDoc();
597         return any.extract_any();
598     }
599
600     public org.omg.DynamicAny.DynAny JavaDoc get_dyn_any()
601         throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch JavaDoc,
602                org.omg.DynamicAny.DynAnyPackage.InvalidValue JavaDoc
603     {
604         if (status == STATUS_DESTROYED) {
605         throw wrapper.dynAnyDestroyed() ;
606         }
607         if (any.type().kind().value() != TCKind._tk_any)
608             throw new TypeMismatch JavaDoc();
609         // _REVISIT_ Copy value here?
610
try {
611             return DynAnyUtil.createMostDerivedDynAny(any.extract_any(), orb, true);
612         } catch (InconsistentTypeCode JavaDoc ictc) {
613             // The spec doesn't allow us to throw back this exception
614
// incase the anys any if of type Principal, native or abstract interface.
615
return null;
616         }
617     }
618 }
619
Popular Tags