KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > omg > DynamicAny > DynSequenceHelper


1 package org.omg.DynamicAny;
2
3
4 /**
5 * org/omg/DynamicAny/DynSequenceHelper.java .
6 * Generated by the IDL-to-Java compiler (portable), version "3.2"
7 * from ../../../../src/share/classes/org/omg/DynamicAny/DynamicAny.idl
8 * Saturday, February 9, 2008 9:40:12 AM GMT
9 */

10
11
12 /**
13     * DynSequence objects support the manipulation of IDL sequences.
14     */

15 abstract public class DynSequenceHelper
16 {
17   private static String JavaDoc _id = "IDL:omg.org/DynamicAny/DynSequence:1.0";
18
19   public static void insert (org.omg.CORBA.Any JavaDoc a, org.omg.DynamicAny.DynSequence JavaDoc that)
20   {
21     org.omg.CORBA.portable.OutputStream JavaDoc out = a.create_output_stream ();
22     a.type (type ());
23     write (out, that);
24     a.read_value (out.create_input_stream (), type ());
25   }
26
27   public static org.omg.DynamicAny.DynSequence JavaDoc extract (org.omg.CORBA.Any JavaDoc a)
28   {
29     return read (a.create_input_stream ());
30   }
31
32   private static org.omg.CORBA.TypeCode JavaDoc __typeCode = null;
33   synchronized public static org.omg.CORBA.TypeCode JavaDoc type ()
34   {
35     if (__typeCode == null)
36     {
37       __typeCode = org.omg.CORBA.ORB.init ().create_interface_tc (org.omg.DynamicAny.DynSequenceHelper.id (), "DynSequence");
38     }
39     return __typeCode;
40   }
41
42   public static String JavaDoc id ()
43   {
44     return _id;
45   }
46
47   public static org.omg.DynamicAny.DynSequence JavaDoc read (org.omg.CORBA.portable.InputStream JavaDoc istream)
48   {
49       throw new org.omg.CORBA.MARSHAL JavaDoc ();
50   }
51
52   public static void write (org.omg.CORBA.portable.OutputStream JavaDoc ostream, org.omg.DynamicAny.DynSequence JavaDoc value)
53   {
54       throw new org.omg.CORBA.MARSHAL JavaDoc ();
55   }
56
57   public static org.omg.DynamicAny.DynSequence JavaDoc narrow (org.omg.CORBA.Object JavaDoc obj)
58   {
59     if (obj == null)
60       return null;
61     else if (obj instanceof org.omg.DynamicAny.DynSequence JavaDoc)
62       return (org.omg.DynamicAny.DynSequence JavaDoc)obj;
63     else if (!obj._is_a (id ()))
64       throw new org.omg.CORBA.BAD_PARAM JavaDoc ();
65     else
66     {
67       org.omg.CORBA.portable.Delegate JavaDoc delegate = ((org.omg.CORBA.portable.ObjectImpl JavaDoc)obj)._get_delegate ();
68       org.omg.DynamicAny._DynSequenceStub JavaDoc stub = new org.omg.DynamicAny._DynSequenceStub JavaDoc ();
69       stub._set_delegate(delegate);
70       return stub;
71     }
72   }
73
74   public static org.omg.DynamicAny.DynSequence JavaDoc unchecked_narrow (org.omg.CORBA.Object JavaDoc obj)
75   {
76     if (obj == null)
77       return null;
78     else if (obj instanceof org.omg.DynamicAny.DynSequence JavaDoc)
79       return (org.omg.DynamicAny.DynSequence JavaDoc)obj;
80     else
81     {
82       org.omg.CORBA.portable.Delegate JavaDoc delegate = ((org.omg.CORBA.portable.ObjectImpl JavaDoc)obj)._get_delegate ();
83       org.omg.DynamicAny._DynSequenceStub JavaDoc stub = new org.omg.DynamicAny._DynSequenceStub JavaDoc ();
84       stub._set_delegate(delegate);
85       return stub;
86     }
87   }
88
89 }
90
Popular Tags