1 18 package org.apache.geronimo.interop.rmi.iiop; 19 20 public abstract class StringSeqHelper 21 { 22 public static java.lang.String [] clone 23 (java.lang.String [] _value) 24 { 25 if (_value == null) 26 { 27 return null; 28 } 29 int _16 = _value.length; 30 java.lang.String [] _clone = new java.lang.String [_16]; 31 for (int _17 = 0; _17 < _16; _17++) 32 { 33 _clone[_17] = _value[_17]; 34 } 35 return _clone; 36 } 37 38 public static java.lang.String [] read 39 (org.omg.CORBA.portable.InputStream _input) 40 { 41 int _18 = _input.read_ulong(); 42 java.lang.String [] value = new java.lang.String [_18]; 43 for (int _19 = 0; _19 < _18; _19++) 44 { 45 value[_19] = _input.read_string(); 46 } 47 return value; 48 } 49 50 public static void write 51 (org.omg.CORBA.portable.OutputStream _output, 52 java.lang.String [] value) 53 { 54 if (value == null) 55 { 56 value = new java.lang.String [0]; 57 } 58 int _20 = value.length; 59 _output.write_ulong(_20); 60 for (int _21 = 0; _21 < _20; _21++) 61 { 62 _output.write_string(value[_21]); 63 } 64 } 65 66 public static org.omg.CORBA.TypeCode _type; 67 68 public static org.omg.CORBA.TypeCode type() 69 { 70 if (_type == null) 71 { 72 org.omg.CORBA.ORB orb = org.omg.CORBA.ORB.init(); 73 _type = orb.create_sequence_tc(0, orb.get_primitive_tc(org.omg.CORBA.TCKind.tk_string)); 74 } 75 return _type; 76 } 77 78 public static void insert 79 (org.omg.CORBA.Any any, 80 java.lang.String [] value) 81 { 82 org.omg.CORBA.portable.OutputStream output = any.create_output_stream(); 83 write(output, value); 84 any.read_value(output.create_input_stream(), type()); 85 } 86 87 public static java.lang.String [] extract 88 (org.omg.CORBA.Any any) 89 { 90 if (! any.type().equal(type())) 91 { 92 throw new org.omg.CORBA.BAD_OPERATION (); 93 } 94 return read(any.create_input_stream()); 95 } 96 97 public static java.lang.String id() 98 { 99 return "IDL:org/apache/geronimo/interop/rmi/iiop/StringSeq:1.0"; 100 } 101 } 102 | Popular Tags |