1 package org.omg.CosNaming.NamingContextExtPackage; 2 3 4 10 11 12 15 abstract public class AddressHelper 16 { 17 private static String _id = "IDL:omg.org/CosNaming/NamingContextExt/Address:1.0"; 18 19 public static void insert (org.omg.CORBA.Any a, String that) 20 { 21 org.omg.CORBA.portable.OutputStream 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 String extract (org.omg.CORBA.Any a) 28 { 29 return read (a.create_input_stream ()); 30 } 31 32 private static org.omg.CORBA.TypeCode __typeCode = null; 33 synchronized public static org.omg.CORBA.TypeCode type () 34 { 35 if (__typeCode == null) 36 { 37 __typeCode = org.omg.CORBA.ORB.init ().create_string_tc (0); 38 __typeCode = org.omg.CORBA.ORB.init ().create_alias_tc (org.omg.CosNaming.NamingContextExtPackage.AddressHelper.id (), "Address", __typeCode); 39 } 40 return __typeCode; 41 } 42 43 public static String id () 44 { 45 return _id; 46 } 47 48 public static String read (org.omg.CORBA.portable.InputStream istream) 49 { 50 String value = null; 51 value = istream.read_string (); 52 return value; 53 } 54 55 public static void write (org.omg.CORBA.portable.OutputStream ostream, String value) 56 { 57 ostream.write_string (value); 58 } 59 60 } 61 | Popular Tags |