1 package org.eclipse.emf.codegen.ecore.templates.model; 2 3 import java.util.*; 4 import org.eclipse.emf.codegen.ecore.genmodel.*; 5 6 public class Interface 7 { 8 protected static String nl; 9 public static synchronized Interface create(String lineSeparator) 10 { 11 nl = lineSeparator; 12 Interface result = new Interface(); 13 nl = null; 14 return result; 15 } 16 17 protected final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl; 18 protected final String TEXT_1 = ""; 19 protected final String TEXT_2 = "/**" + NL + " * <copyright>" + NL + " * </copyright>" + NL + " *" + NL + " * "; 20 protected final String TEXT_3 = "Id"; 21 protected final String TEXT_4 = NL + " */" + NL + "package "; 22 protected final String TEXT_5 = ";" + NL; 23 protected final String TEXT_6 = NL + NL + "/**" + NL + " * <!-- begin-user-doc -->" + NL + " * A representation of the model object '<em><b>"; 24 protected final String TEXT_7 = "</b></em>'." + NL + " * <!-- end-user-doc -->"; 25 protected final String TEXT_8 = NL + " *" + NL + " * <!-- begin-model-doc -->" + NL + " * "; 26 protected final String TEXT_9 = NL + " * <!-- end-model-doc -->"; 27 protected final String TEXT_10 = NL + " *"; 28 protected final String TEXT_11 = NL + " * <p>" + NL + " * The following features are supported:" + NL + " * <ul>"; 29 protected final String TEXT_12 = NL + " * <li>{@link "; 30 protected final String TEXT_13 = "#"; 31 protected final String TEXT_14 = " <em>"; 32 protected final String TEXT_15 = "</em>}</li>"; 33 protected final String TEXT_16 = NL + " * </ul>" + NL + " * </p>"; 34 protected final String TEXT_17 = NL + " *" + NL + " * @see "; 35 protected final String TEXT_18 = "#get"; 36 protected final String TEXT_19 = "()"; 37 protected final String TEXT_20 = NL + " * @model "; 38 protected final String TEXT_21 = NL + " * "; 39 protected final String TEXT_22 = NL + " * @model"; 40 protected final String TEXT_23 = NL + " * @extends "; 41 protected final String TEXT_24 = NL + " * @generated" + NL + " */" + NL + "public interface "; 42 protected final String TEXT_25 = NL + "{"; 43 protected final String TEXT_26 = NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\t"; 44 protected final String TEXT_27 = " copyright = \""; 45 protected final String TEXT_28 = "\";"; 46 protected final String TEXT_29 = NL; 47 protected final String TEXT_30 = NL + "\t/**" + NL + "\t * Returns the value of the '<em><b>"; 48 protected final String TEXT_31 = "</b></em>' "; 49 protected final String TEXT_32 = "."; 50 protected final String TEXT_33 = NL + "\t * The key is of type "; 51 protected final String TEXT_34 = "list of {@link "; 52 protected final String TEXT_35 = "}"; 53 protected final String TEXT_36 = "{@link "; 54 protected final String TEXT_37 = "}"; 55 protected final String TEXT_38 = "," + NL + "\t * and the value is of type "; 56 protected final String TEXT_39 = "list of {@link "; 57 protected final String TEXT_40 = "}"; 58 protected final String TEXT_41 = "{@link "; 59 protected final String TEXT_42 = "}"; 60 protected final String TEXT_43 = ","; 61 protected final String TEXT_44 = NL + "\t * The list contents are of type {@link "; 62 protected final String TEXT_45 = "}."; 63 protected final String TEXT_46 = NL + "\t * The default value is <code>"; 64 protected final String TEXT_47 = "</code>."; 65 protected final String TEXT_48 = NL + "\t * The literals are from the enumeration {@link "; 66 protected final String TEXT_49 = "}."; 67 protected final String TEXT_50 = NL + "\t * It is bidirectional and its opposite is '{@link "; 68 protected final String TEXT_51 = "#"; 69 protected final String TEXT_52 = " <em>"; 70 protected final String TEXT_53 = "</em>}'."; 71 protected final String TEXT_54 = NL + "\t * <!-- begin-user-doc -->"; 72 protected final String TEXT_55 = NL + "\t * <p>" + NL + "\t * If the meaning of the '<em>"; 73 protected final String TEXT_56 = "</em>' "; 74 protected final String TEXT_57 = " isn't clear," + NL + "\t * there really should be more of a description here..." + NL + "\t * </p>"; 75 protected final String TEXT_58 = NL + "\t * <!-- end-user-doc -->"; 76 protected final String TEXT_59 = NL + "\t * <!-- begin-model-doc -->" + NL + "\t * "; 77 protected final String TEXT_60 = NL + "\t * <!-- end-model-doc -->"; 78 protected final String TEXT_61 = NL + "\t * @return the value of the '<em>"; 79 protected final String TEXT_62 = "</em>' "; 80 protected final String TEXT_63 = "."; 81 protected final String TEXT_64 = NL + "\t * @see "; 82 protected final String TEXT_65 = NL + "\t * @see #isSet"; 83 protected final String TEXT_66 = "()"; 84 protected final String TEXT_67 = NL + "\t * @see #unset"; 85 protected final String TEXT_68 = "()"; 86 protected final String TEXT_69 = NL + "\t * @see #set"; 87 protected final String TEXT_70 = "("; 88 protected final String TEXT_71 = ")"; 89 protected final String TEXT_72 = NL + "\t * @see "; 90 protected final String TEXT_73 = "#get"; 91 protected final String TEXT_74 = "()"; 92 protected final String TEXT_75 = NL + "\t * @see "; 93 protected final String TEXT_76 = "#"; 94 protected final String TEXT_77 = NL + "\t * @model "; 95 protected final String TEXT_78 = NL + "\t * "; 96 protected final String TEXT_79 = NL + "\t * @model"; 97 protected final String TEXT_80 = NL + "\t * @generated" + NL + "\t */" + NL + "\t"; 98 protected final String TEXT_81 = " "; 99 protected final String TEXT_82 = "();" + NL; 100 protected final String TEXT_83 = NL + "\t/**" + NL + "\t * Sets the value of the '{@link "; 101 protected final String TEXT_84 = "#"; 102 protected final String TEXT_85 = " <em>"; 103 protected final String TEXT_86 = "</em>}' "; 104 protected final String TEXT_87 = "." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @param value the new value of the '<em>"; 105 protected final String TEXT_88 = "</em>' "; 106 protected final String TEXT_89 = "."; 107 protected final String TEXT_90 = NL + "\t * @see "; 108 protected final String TEXT_91 = NL + "\t * @see #isSet"; 109 protected final String TEXT_92 = "()"; 110 protected final String TEXT_93 = NL + "\t * @see #unset"; 111 protected final String TEXT_94 = "()"; 112 protected final String TEXT_95 = NL + "\t * @see #"; 113 protected final String TEXT_96 = "()" + NL + "\t * @generated" + NL + "\t */" + NL + "\tvoid set"; 114 protected final String TEXT_97 = "("; 115 protected final String TEXT_98 = " value);" + NL; 116 protected final String TEXT_99 = NL + "\t/**" + NL + "\t * Unsets the value of the '{@link "; 117 protected final String TEXT_100 = "#"; 118 protected final String TEXT_101 = " <em>"; 119 protected final String TEXT_102 = "</em>}' "; 120 protected final String TEXT_103 = "." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->"; 121 protected final String TEXT_104 = NL + "\t * @see #isSet"; 122 protected final String TEXT_105 = "()"; 123 protected final String TEXT_106 = NL + "\t * @see #"; 124 protected final String TEXT_107 = "()"; 125 protected final String TEXT_108 = NL + "\t * @see #set"; 126 protected final String TEXT_109 = "("; 127 protected final String TEXT_110 = ")"; 128 protected final String TEXT_111 = NL + "\t * @generated" + NL + "\t */" + NL + "\tvoid unset"; 129 protected final String TEXT_112 = "();" + NL; 130 protected final String TEXT_113 = NL + "\t/**" + NL + "\t * Returns whether the value of the '{@link "; 131 protected final String TEXT_114 = "#"; 132 protected final String TEXT_115 = " <em>"; 133 protected final String TEXT_116 = "</em>}' "; 134 protected final String TEXT_117 = " is set." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @return whether the value of the '<em>"; 135 protected final String TEXT_118 = "</em>' "; 136 protected final String TEXT_119 = " is set."; 137 protected final String TEXT_120 = NL + "\t * @see #unset"; 138 protected final String TEXT_121 = "()"; 139 protected final String TEXT_122 = NL + "\t * @see #"; 140 protected final String TEXT_123 = "()"; 141 protected final String TEXT_124 = NL + "\t * @see #set"; 142 protected final String TEXT_125 = "("; 143 protected final String TEXT_126 = ")"; 144 protected final String TEXT_127 = NL + "\t * @generated" + NL + "\t */" + NL + "\tboolean isSet"; 145 protected final String TEXT_128 = "();" + NL; 146 protected final String TEXT_129 = NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->"; 147 protected final String TEXT_130 = NL + "\t * <!-- begin-model-doc -->" + NL + "\t * "; 148 protected final String TEXT_131 = NL + "\t * <!-- end-model-doc -->"; 149 protected final String TEXT_132 = NL + "\t * @model "; 150 protected final String TEXT_133 = NL + "\t * "; 151 protected final String TEXT_134 = NL + "\t * @model"; 152 protected final String TEXT_135 = NL + "\t * @generated" + NL + "\t */" + NL + "\t"; 153 protected final String TEXT_136 = " "; 154 protected final String TEXT_137 = "("; 155 protected final String TEXT_138 = ")"; 156 protected final String TEXT_139 = ";" + NL; 157 protected final String TEXT_140 = NL + "} // "; 158 protected final String TEXT_141 = NL; 159 160 public String generate(Object argument) 161 { 162 StringBuffer stringBuffer = new StringBuffer (); 163 164 178 179 GenClass genClass = (GenClass)argument; GenPackage genPackage = genClass.getGenPackage(); GenModel genModel=genPackage.getGenModel(); 180 stringBuffer.append(TEXT_1); 181 stringBuffer.append(TEXT_2); 182 stringBuffer.append("$"); 183 stringBuffer.append(TEXT_3); 184 stringBuffer.append("$"); 185 stringBuffer.append(TEXT_4); 186 stringBuffer.append(genPackage.getInterfacePackageName()); 187 stringBuffer.append(TEXT_5); 188 genModel.markImportLocation(stringBuffer, genPackage); 189 stringBuffer.append(TEXT_6); 190 stringBuffer.append(genClass.getFormattedName()); 191 stringBuffer.append(TEXT_7); 192 if (genClass.hasDocumentation()) { 193 stringBuffer.append(TEXT_8); 194 stringBuffer.append(genClass.getDocumentation(genModel.getIndentation(stringBuffer))); 195 stringBuffer.append(TEXT_9); 196 } 197 stringBuffer.append(TEXT_10); 198 if (!genClass.getGenFeatures().isEmpty()) { 199 stringBuffer.append(TEXT_11); 200 for (Iterator i=genClass.getGenFeatures().iterator(); i.hasNext();) { GenFeature genFeature = (GenFeature)i.next(); 201 if (!genFeature.isSuppressedGetVisibility()) { 202 stringBuffer.append(TEXT_12); 203 stringBuffer.append(genClass.getQualifiedInterfaceName()); 204 stringBuffer.append(TEXT_13); 205 stringBuffer.append(genFeature.getGetAccessor()); 206 stringBuffer.append(TEXT_14); 207 stringBuffer.append(genFeature.getFormattedName()); 208 stringBuffer.append(TEXT_15); 209 } 210 } 211 stringBuffer.append(TEXT_16); 212 } 213 stringBuffer.append(TEXT_17); 214 stringBuffer.append(genPackage.getQualifiedPackageInterfaceName()); 215 stringBuffer.append(TEXT_18); 216 stringBuffer.append(genClass.getClassifierAccessorName()); 217 stringBuffer.append(TEXT_19); 218 {boolean first = true; for (StringTokenizer stringTokenizer = new StringTokenizer(genClass.getModelInfo(), "\n\r"); stringTokenizer.hasMoreTokens(); ) { String modelInfo = stringTokenizer.nextToken(); if (first) { first = false; 219 stringBuffer.append(TEXT_20); 220 stringBuffer.append(modelInfo); 221 } else { 222 stringBuffer.append(TEXT_21); 223 stringBuffer.append(modelInfo); 224 }} if (first) { 225 stringBuffer.append(TEXT_22); 226 }} 227 if (genClass.needsRootExtendsInterfaceExtendsTag()) { 228 stringBuffer.append(TEXT_23); 229 stringBuffer.append(genModel.getImportedName(genModel.getRootExtendsInterface())); 230 } 231 stringBuffer.append(TEXT_24); 232 stringBuffer.append(genClass.getInterfaceName()); 233 stringBuffer.append(genClass.getInterfaceExtends()); 234 stringBuffer.append(TEXT_25); 235 if (genModel.getCopyrightText() != null) { 236 stringBuffer.append(TEXT_26); 237 stringBuffer.append(genModel.getImportedName("java.lang.String")); 238 stringBuffer.append(TEXT_27); 239 stringBuffer.append(genModel.getCopyrightText()); 240 stringBuffer.append(TEXT_28); 241 stringBuffer.append(genModel.getNonNLS()); 242 stringBuffer.append(TEXT_29); 243 } 244 for (Iterator i=genClass.getDeclaredGenFeatures().iterator(); i.hasNext();) { GenFeature genFeature = (GenFeature)i.next(); 245 if (genFeature.isGet() && !genFeature.isSuppressedGetVisibility()) { 246 stringBuffer.append(TEXT_30); 247 stringBuffer.append(genFeature.getFormattedName()); 248 stringBuffer.append(TEXT_31); 249 stringBuffer.append(genFeature.getFeatureKind()); 250 stringBuffer.append(TEXT_32); 251 if (genFeature.isListType()) { 252 if (genFeature.isMapType()) { GenFeature keyFeature = genFeature.getMapEntryTypeGenClass().getMapEntryKeyFeature(); GenFeature valueFeature = genFeature.getMapEntryTypeGenClass().getMapEntryValueFeature(); 253 stringBuffer.append(TEXT_33); 254 if (keyFeature.isListType()) { 255 stringBuffer.append(TEXT_34); 256 stringBuffer.append(keyFeature.getQualifiedListItemType()); 257 stringBuffer.append(TEXT_35); 258 } else { 259 stringBuffer.append(TEXT_36); 260 stringBuffer.append(keyFeature.getType()); 261 stringBuffer.append(TEXT_37); 262 } 263 stringBuffer.append(TEXT_38); 264 if (valueFeature.isListType()) { 265 stringBuffer.append(TEXT_39); 266 stringBuffer.append(valueFeature.getQualifiedListItemType()); 267 stringBuffer.append(TEXT_40); 268 } else { 269 stringBuffer.append(TEXT_41); 270 stringBuffer.append(valueFeature.getType()); 271 stringBuffer.append(TEXT_42); 272 } 273 stringBuffer.append(TEXT_43); 274 } else { 275 stringBuffer.append(TEXT_44); 276 stringBuffer.append(genFeature.getQualifiedListItemType()); 277 stringBuffer.append(TEXT_45); 278 } 279 } else if (genFeature.isSetDefaultValue()) { 280 stringBuffer.append(TEXT_46); 281 stringBuffer.append(genFeature.getDefaultValue()); 282 stringBuffer.append(TEXT_47); 283 } 284 if (genFeature.getTypeGenEnum() != null) { 285 stringBuffer.append(TEXT_48); 286 stringBuffer.append(genFeature.getTypeGenEnum().getQualifiedName()); 287 stringBuffer.append(TEXT_49); 288 } 289 if (genFeature.isBidirectional() && !genFeature.getReverse().getGenClass().isMapEntry()) { GenFeature reverseGenFeature = genFeature.getReverse(); 290 if (!reverseGenFeature.isSuppressedGetVisibility()) { 291 stringBuffer.append(TEXT_50); 292 stringBuffer.append(reverseGenFeature.getGenClass().getQualifiedInterfaceName()); 293 stringBuffer.append(TEXT_51); 294 stringBuffer.append(reverseGenFeature.getGetAccessor()); 295 stringBuffer.append(TEXT_52); 296 stringBuffer.append(reverseGenFeature.getFormattedName()); 297 stringBuffer.append(TEXT_53); 298 } 299 } 300 stringBuffer.append(TEXT_54); 301 if (!genFeature.hasDocumentation()) { 302 stringBuffer.append(TEXT_55); 303 stringBuffer.append(genFeature.getFormattedName()); 304 stringBuffer.append(TEXT_56); 305 stringBuffer.append(genFeature.getFeatureKind()); 306 stringBuffer.append(TEXT_57); 307 } 308 stringBuffer.append(TEXT_58); 309 if (genFeature.hasDocumentation()) { 310 stringBuffer.append(TEXT_59); 311 stringBuffer.append(genFeature.getDocumentation(genModel.getIndentation(stringBuffer))); 312 stringBuffer.append(TEXT_60); 313 } 314 stringBuffer.append(TEXT_61); 315 stringBuffer.append(genFeature.getFormattedName()); 316 stringBuffer.append(TEXT_62); 317 stringBuffer.append(genFeature.getFeatureKind()); 318 stringBuffer.append(TEXT_63); 319 if (genFeature.getTypeGenEnum() != null) { 320 stringBuffer.append(TEXT_64); 321 stringBuffer.append(genFeature.getTypeGenEnum().getQualifiedName()); 322 } 323 if (genFeature.isUnsettable()) { 324 if (!genFeature.isSuppressedIsSetVisibility()) { 325 stringBuffer.append(TEXT_65); 326 stringBuffer.append(genFeature.getAccessorName()); 327 stringBuffer.append(TEXT_66); 328 } 329 if (genFeature.isChangeable() && !genFeature.isSuppressedUnsetVisibility()) { 330 stringBuffer.append(TEXT_67); 331 stringBuffer.append(genFeature.getAccessorName()); 332 stringBuffer.append(TEXT_68); 333 } 334 } 335 if (genFeature.isChangeable() && !genFeature.isListType() && !genFeature.isSuppressedSetVisibility()) { 336 stringBuffer.append(TEXT_69); 337 stringBuffer.append(genFeature.getAccessorName()); 338 stringBuffer.append(TEXT_70); 339 stringBuffer.append(genFeature.getImportedType()); 340 stringBuffer.append(TEXT_71); 341 } 342 stringBuffer.append(TEXT_72); 343 stringBuffer.append(genPackage.getQualifiedPackageInterfaceName()); 344 stringBuffer.append(TEXT_73); 345 stringBuffer.append(genFeature.getFeatureAccessorName()); 346 stringBuffer.append(TEXT_74); 347 if (genFeature.isBidirectional() && !genFeature.getReverse().getGenClass().isMapEntry()) { GenFeature reverseGenFeature = genFeature.getReverse(); 348 if (!reverseGenFeature.isSuppressedGetVisibility()) { 349 stringBuffer.append(TEXT_75); 350 stringBuffer.append(reverseGenFeature.getGenClass().getQualifiedInterfaceName()); 351 stringBuffer.append(TEXT_76); 352 stringBuffer.append(reverseGenFeature.getGetAccessor()); 353 } 354 } 355 {boolean first = true; for (StringTokenizer stringTokenizer = new StringTokenizer(genFeature.getModelInfo(), "\n\r"); stringTokenizer.hasMoreTokens(); ) { String modelInfo = stringTokenizer.nextToken(); if (first) { first = false; 356 stringBuffer.append(TEXT_77); 357 stringBuffer.append(modelInfo); 358 } else { 359 stringBuffer.append(TEXT_78); 360 stringBuffer.append(modelInfo); 361 }} if (first) { 362 stringBuffer.append(TEXT_79); 363 }} 364 stringBuffer.append(TEXT_80); 365 stringBuffer.append(genFeature.getImportedType()); 366 stringBuffer.append(TEXT_81); 367 stringBuffer.append(genFeature.getGetAccessor()); 368 stringBuffer.append(TEXT_82); 369 } 371 if (genFeature.isSet() && !genFeature.isSuppressedSetVisibility()) { 372 stringBuffer.append(TEXT_83); 373 stringBuffer.append(genClass.getQualifiedInterfaceName()); 374 stringBuffer.append(TEXT_84); 375 stringBuffer.append(genFeature.getGetAccessor()); 376 stringBuffer.append(TEXT_85); 377 stringBuffer.append(genFeature.getFormattedName()); 378 stringBuffer.append(TEXT_86); 379 stringBuffer.append(genFeature.getFeatureKind()); 380 stringBuffer.append(TEXT_87); 381 stringBuffer.append(genFeature.getFormattedName()); 382 stringBuffer.append(TEXT_88); 383 stringBuffer.append(genFeature.getFeatureKind()); 384 stringBuffer.append(TEXT_89); 385 if (genFeature.isEnumType()) { 386 stringBuffer.append(TEXT_90); 387 stringBuffer.append(genFeature.getTypeGenEnum().getQualifiedName()); 388 } 389 if (genFeature.isUnsettable()) { 390 if (!genFeature.isSuppressedIsSetVisibility()) { 391 stringBuffer.append(TEXT_91); 392 stringBuffer.append(genFeature.getAccessorName()); 393 stringBuffer.append(TEXT_92); 394 } 395 if (!genFeature.isSuppressedUnsetVisibility()) { 396 stringBuffer.append(TEXT_93); 397 stringBuffer.append(genFeature.getAccessorName()); 398 stringBuffer.append(TEXT_94); 399 } 400 } 401 stringBuffer.append(TEXT_95); 402 stringBuffer.append(genFeature.getGetAccessor()); 403 stringBuffer.append(TEXT_96); 404 stringBuffer.append(genFeature.getAccessorName()); 405 stringBuffer.append(TEXT_97); 406 stringBuffer.append(genFeature.getImportedType()); 407 stringBuffer.append(TEXT_98); 408 } 410 if (genFeature.isUnset() && !genFeature.isSuppressedUnsetVisibility()) { 411 stringBuffer.append(TEXT_99); 412 stringBuffer.append(genClass.getQualifiedInterfaceName()); 413 stringBuffer.append(TEXT_100); 414 stringBuffer.append(genFeature.getGetAccessor()); 415 stringBuffer.append(TEXT_101); 416 stringBuffer.append(genFeature.getFormattedName()); 417 stringBuffer.append(TEXT_102); 418 stringBuffer.append(genFeature.getFeatureKind()); 419 stringBuffer.append(TEXT_103); 420 if (!genFeature.isSuppressedIsSetVisibility()) { 421 stringBuffer.append(TEXT_104); 422 stringBuffer.append(genFeature.getAccessorName()); 423 stringBuffer.append(TEXT_105); 424 } 425 stringBuffer.append(TEXT_106); 426 stringBuffer.append(genFeature.getGetAccessor()); 427 stringBuffer.append(TEXT_107); 428 if (!genFeature.isListType() && !genFeature.isSuppressedSetVisibility()) { 429 stringBuffer.append(TEXT_108); 430 stringBuffer.append(genFeature.getAccessorName()); 431 stringBuffer.append(TEXT_109); 432 stringBuffer.append(genFeature.getImportedType()); 433 stringBuffer.append(TEXT_110); 434 } 435 stringBuffer.append(TEXT_111); 436 stringBuffer.append(genFeature.getAccessorName()); 437 stringBuffer.append(TEXT_112); 438 } 440 if (genFeature.isIsSet() && !genFeature.isSuppressedIsSetVisibility()) { 441 stringBuffer.append(TEXT_113); 442 stringBuffer.append(genClass.getQualifiedInterfaceName()); 443 stringBuffer.append(TEXT_114); 444 stringBuffer.append(genFeature.getGetAccessor()); 445 stringBuffer.append(TEXT_115); 446 stringBuffer.append(genFeature.getFormattedName()); 447 stringBuffer.append(TEXT_116); 448 stringBuffer.append(genFeature.getFeatureKind()); 449 stringBuffer.append(TEXT_117); 450 stringBuffer.append(genFeature.getFormattedName()); 451 stringBuffer.append(TEXT_118); 452 stringBuffer.append(genFeature.getFeatureKind()); 453 stringBuffer.append(TEXT_119); 454 if (genFeature.isChangeable() && !genFeature.isSuppressedUnsetVisibility()) { 455 stringBuffer.append(TEXT_120); 456 stringBuffer.append(genFeature.getAccessorName()); 457 stringBuffer.append(TEXT_121); 458 } 459 stringBuffer.append(TEXT_122); 460 stringBuffer.append(genFeature.getGetAccessor()); 461 stringBuffer.append(TEXT_123); 462 if (!genFeature.isListType() && genFeature.isChangeable() && !genFeature.isSuppressedSetVisibility()) { 463 stringBuffer.append(TEXT_124); 464 stringBuffer.append(genFeature.getAccessorName()); 465 stringBuffer.append(TEXT_125); 466 stringBuffer.append(genFeature.getImportedType()); 467 stringBuffer.append(TEXT_126); 468 } 469 stringBuffer.append(TEXT_127); 470 stringBuffer.append(genFeature.getAccessorName()); 471 stringBuffer.append(TEXT_128); 472 } 474 } for (Iterator i=genClass.getDeclaredGenOperations().iterator(); i.hasNext();) { GenOperation genOperation = (GenOperation)i.next(); 477 stringBuffer.append(TEXT_129); 478 if (genOperation.hasDocumentation()) { 479 stringBuffer.append(TEXT_130); 480 stringBuffer.append(genOperation.getDocumentation(genModel.getIndentation(stringBuffer))); 481 stringBuffer.append(TEXT_131); 482 } 483 {boolean first = true; for (StringTokenizer stringTokenizer = new StringTokenizer(genOperation.getModelInfo(), "\n\r"); stringTokenizer.hasMoreTokens(); ) { String modelInfo = stringTokenizer.nextToken(); if (first) { first = false; 484 stringBuffer.append(TEXT_132); 485 stringBuffer.append(modelInfo); 486 } else { 487 stringBuffer.append(TEXT_133); 488 stringBuffer.append(modelInfo); 489 }} if (first) { 490 stringBuffer.append(TEXT_134); 491 }} 492 stringBuffer.append(TEXT_135); 493 stringBuffer.append(genOperation.getImportedType()); 494 stringBuffer.append(TEXT_136); 495 stringBuffer.append(genOperation.getName()); 496 stringBuffer.append(TEXT_137); 497 stringBuffer.append(genOperation.getParameters()); 498 stringBuffer.append(TEXT_138); 499 stringBuffer.append(genOperation.getThrows()); 500 stringBuffer.append(TEXT_139); 501 } stringBuffer.append(TEXT_140); 504 stringBuffer.append(genClass.getInterfaceName()); 505 genModel.emitSortedImports(); 506 stringBuffer.append(TEXT_141); 507 return stringBuffer.toString(); 508 } 509 } 510 | Popular Tags |