1 22 package org.jboss.iiop.rmi.ir; 23 24 import org.omg.CORBA.TypeCode ; 25 import org.omg.CORBA.DefinitionKind ; 26 import org.omg.CORBA.TypedefDefOperations ; 27 import org.omg.CORBA.Any ; 28 import org.omg.CORBA.TypeDescription ; 29 import org.omg.CORBA.TypeDescriptionHelper; 30 import org.omg.CORBA.ContainedOperations ; 31 import org.omg.CORBA.ContainedPackage.Description; 32 33 39 abstract class TypedefDefImpl 40 extends ContainedImpl 41 implements TypedefDefOperations , LocalContainedIDLType 42 { 43 45 47 49 51 TypedefDefImpl(String id, String name, String version, 52 LocalContainer defined_in, TypeCode typeCode, 53 DefinitionKind def_kind, RepositoryImpl repository) 54 { 55 super(id, name, version, defined_in, 56 def_kind, repository); 57 58 this.typeCode = typeCode; 59 } 60 61 63 65 public Description describe() 66 { 67 String defined_in_id = "IR"; 68 69 if (defined_in instanceof ContainedOperations ) 70 defined_in_id = ((ContainedOperations )defined_in).id(); 71 72 TypeDescription td = new TypeDescription (name, id, defined_in_id, 73 version, typeCode); 74 75 Any any = getORB().create_any(); 76 77 TypeDescriptionHelper.insert(any, td); 78 79 return new Description (DefinitionKind.dk_Typedef, any); 80 } 81 82 84 public TypeCode type() 85 { 86 return typeCode; 87 } 88 89 91 93 96 private TypeCode typeCode; 97 } 98 | Popular Tags |