1 26 27 package org.objectweb.ccm.IDL3; 28 29 37 38 public class InitializerImpl 39 extends ExceptionListImpl 40 implements Initializer 41 { 42 48 51 private String name_; 52 53 56 private ParameterListImpl parameters_; 57 58 64 69 protected 70 InitializerImpl() 71 { 72 name_ = ""; 74 parameters_ = new ParameterListImpl(); 75 } 76 77 83 88 public org.omg.CORBA.ExtInitializer 89 getExtInitializer() 90 { 91 String [] names = parameters_.getParamNames(); 92 TypeRef[] types = parameters_.getParamTypes(); 93 org.omg.CORBA.StructMember [] result = 94 new org.omg.CORBA.StructMember [names.length]; 95 for(int i=0; i<result.length; i++) 96 { 97 result[i] = new org.omg.CORBA.StructMember ( 98 names[i], 99 org.objectweb.openccm.corba.TypeCodeUtils.getTC_void(), 100 types[i].getIDLType()); 101 } 102 103 return new org.omg.CORBA.ExtInitializer(result, 104 getExceptionDefs(), 105 getExceptionDescriptions(), 106 name_); 107 } 108 109 112 protected void 113 destroy() 114 { 115 parameters_.destroy(); 116 } 117 118 124 127 public void 128 setName(String name) 129 { 130 name_ = name; 131 } 132 133 136 public String 137 getName() 138 { 139 return name_; 140 } 141 142 145 public ParameterList 146 getParameters() 147 { 148 return parameters_; 149 } 150 151 157 163 public void 164 addInParam(String name, 165 TypeRef type) 166 { 167 parameters_.addParam(name, type, OperationDecl.PARAM_IN); 168 } 169 } 170 | Popular Tags |