KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > emf > codegen > ecore > templates > model > Interface


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 JavaDoc nl;
9   public static synchronized Interface create(String JavaDoc lineSeparator)
10   {
11     nl = lineSeparator;
12     Interface result = new Interface();
13     nl = null;
14     return result;
15   }
16
17   protected final String JavaDoc NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl;
18   protected final String JavaDoc TEXT_1 = "";
19   protected final String JavaDoc TEXT_2 = "/**" + NL + " * <copyright>" + NL + " * </copyright>" + NL + " *" + NL + " * ";
20   protected final String JavaDoc TEXT_3 = "Id";
21   protected final String JavaDoc TEXT_4 = NL + " */" + NL + "package ";
22   protected final String JavaDoc TEXT_5 = ";" + NL;
23   protected final String JavaDoc TEXT_6 = NL + NL + "/**" + NL + " * <!-- begin-user-doc -->" + NL + " * A representation of the model object '<em><b>";
24   protected final String JavaDoc TEXT_7 = "</b></em>'." + NL + " * <!-- end-user-doc -->";
25   protected final String JavaDoc TEXT_8 = NL + " *" + NL + " * <!-- begin-model-doc -->" + NL + " * ";
26   protected final String JavaDoc TEXT_9 = NL + " * <!-- end-model-doc -->";
27   protected final String JavaDoc TEXT_10 = NL + " *";
28   protected final String JavaDoc TEXT_11 = NL + " * <p>" + NL + " * The following features are supported:" + NL + " * <ul>";
29   protected final String JavaDoc TEXT_12 = NL + " * <li>{@link ";
30   protected final String JavaDoc TEXT_13 = "#";
31   protected final String JavaDoc TEXT_14 = " <em>";
32   protected final String JavaDoc TEXT_15 = "</em>}</li>";
33   protected final String JavaDoc TEXT_16 = NL + " * </ul>" + NL + " * </p>";
34   protected final String JavaDoc TEXT_17 = NL + " *" + NL + " * @see ";
35   protected final String JavaDoc TEXT_18 = "#get";
36   protected final String JavaDoc TEXT_19 = "()";
37   protected final String JavaDoc TEXT_20 = NL + " * @model ";
38   protected final String JavaDoc TEXT_21 = NL + " * ";
39   protected final String JavaDoc TEXT_22 = NL + " * @model";
40   protected final String JavaDoc TEXT_23 = NL + " * @extends ";
41   protected final String JavaDoc TEXT_24 = NL + " * @generated" + NL + " */" + NL + "public interface ";
42   protected final String JavaDoc TEXT_25 = NL + "{";
43   protected final String JavaDoc 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 JavaDoc TEXT_27 = " copyright = \"";
45   protected final String JavaDoc TEXT_28 = "\";";
46   protected final String JavaDoc TEXT_29 = NL;
47   protected final String JavaDoc TEXT_30 = NL + "\t/**" + NL + "\t * Returns the value of the '<em><b>";
48   protected final String JavaDoc TEXT_31 = "</b></em>' ";
49   protected final String JavaDoc TEXT_32 = ".";
50   protected final String JavaDoc TEXT_33 = NL + "\t * The key is of type ";
51   protected final String JavaDoc TEXT_34 = "list of {@link ";
52   protected final String JavaDoc TEXT_35 = "}";
53   protected final String JavaDoc TEXT_36 = "{@link ";
54   protected final String JavaDoc TEXT_37 = "}";
55   protected final String JavaDoc TEXT_38 = "," + NL + "\t * and the value is of type ";
56   protected final String JavaDoc TEXT_39 = "list of {@link ";
57   protected final String JavaDoc TEXT_40 = "}";
58   protected final String JavaDoc TEXT_41 = "{@link ";
59   protected final String JavaDoc TEXT_42 = "}";
60   protected final String JavaDoc TEXT_43 = ",";
61   protected final String JavaDoc TEXT_44 = NL + "\t * The list contents are of type {@link ";
62   protected final String JavaDoc TEXT_45 = "}.";
63   protected final String JavaDoc TEXT_46 = NL + "\t * The default value is <code>";
64   protected final String JavaDoc TEXT_47 = "</code>.";
65   protected final String JavaDoc TEXT_48 = NL + "\t * The literals are from the enumeration {@link ";
66   protected final String JavaDoc TEXT_49 = "}.";
67   protected final String JavaDoc TEXT_50 = NL + "\t * It is bidirectional and its opposite is '{@link ";
68   protected final String JavaDoc TEXT_51 = "#";
69   protected final String JavaDoc TEXT_52 = " <em>";
70   protected final String JavaDoc TEXT_53 = "</em>}'.";
71   protected final String JavaDoc TEXT_54 = NL + "\t * <!-- begin-user-doc -->";
72   protected final String JavaDoc TEXT_55 = NL + "\t * <p>" + NL + "\t * If the meaning of the '<em>";
73   protected final String JavaDoc TEXT_56 = "</em>' ";
74   protected final String JavaDoc TEXT_57 = " isn't clear," + NL + "\t * there really should be more of a description here..." + NL + "\t * </p>";
75   protected final String JavaDoc TEXT_58 = NL + "\t * <!-- end-user-doc -->";
76   protected final String JavaDoc TEXT_59 = NL + "\t * <!-- begin-model-doc -->" + NL + "\t * ";
77   protected final String JavaDoc TEXT_60 = NL + "\t * <!-- end-model-doc -->";
78   protected final String JavaDoc TEXT_61 = NL + "\t * @return the value of the '<em>";
79   protected final String JavaDoc TEXT_62 = "</em>' ";
80   protected final String JavaDoc TEXT_63 = ".";
81   protected final String JavaDoc TEXT_64 = NL + "\t * @see ";
82   protected final String JavaDoc TEXT_65 = NL + "\t * @see #isSet";
83   protected final String JavaDoc TEXT_66 = "()";
84   protected final String JavaDoc TEXT_67 = NL + "\t * @see #unset";
85   protected final String JavaDoc TEXT_68 = "()";
86   protected final String JavaDoc TEXT_69 = NL + "\t * @see #set";
87   protected final String JavaDoc TEXT_70 = "(";
88   protected final String JavaDoc TEXT_71 = ")";
89   protected final String JavaDoc TEXT_72 = NL + "\t * @see ";
90   protected final String JavaDoc TEXT_73 = "#get";
91   protected final String JavaDoc TEXT_74 = "()";
92   protected final String JavaDoc TEXT_75 = NL + "\t * @see ";
93   protected final String JavaDoc TEXT_76 = "#";
94   protected final String JavaDoc TEXT_77 = NL + "\t * @model ";
95   protected final String JavaDoc TEXT_78 = NL + "\t * ";
96   protected final String JavaDoc TEXT_79 = NL + "\t * @model";
97   protected final String JavaDoc TEXT_80 = NL + "\t * @generated" + NL + "\t */" + NL + "\t";
98   protected final String JavaDoc TEXT_81 = " ";
99   protected final String JavaDoc TEXT_82 = "();" + NL;
100   protected final String JavaDoc TEXT_83 = NL + "\t/**" + NL + "\t * Sets the value of the '{@link ";
101   protected final String JavaDoc TEXT_84 = "#";
102   protected final String JavaDoc TEXT_85 = " <em>";
103   protected final String JavaDoc TEXT_86 = "</em>}' ";
104   protected final String JavaDoc 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 JavaDoc TEXT_88 = "</em>' ";
106   protected final String JavaDoc TEXT_89 = ".";
107   protected final String JavaDoc TEXT_90 = NL + "\t * @see ";
108   protected final String JavaDoc TEXT_91 = NL + "\t * @see #isSet";
109   protected final String JavaDoc TEXT_92 = "()";
110   protected final String JavaDoc TEXT_93 = NL + "\t * @see #unset";
111   protected final String JavaDoc TEXT_94 = "()";
112   protected final String JavaDoc TEXT_95 = NL + "\t * @see #";
113   protected final String JavaDoc TEXT_96 = "()" + NL + "\t * @generated" + NL + "\t */" + NL + "\tvoid set";
114   protected final String JavaDoc TEXT_97 = "(";
115   protected final String JavaDoc TEXT_98 = " value);" + NL;
116   protected final String JavaDoc TEXT_99 = NL + "\t/**" + NL + "\t * Unsets the value of the '{@link ";
117   protected final String JavaDoc TEXT_100 = "#";
118   protected final String JavaDoc TEXT_101 = " <em>";
119   protected final String JavaDoc TEXT_102 = "</em>}' ";
120   protected final String JavaDoc TEXT_103 = "." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->";
121   protected final String JavaDoc TEXT_104 = NL + "\t * @see #isSet";
122   protected final String JavaDoc TEXT_105 = "()";
123   protected final String JavaDoc TEXT_106 = NL + "\t * @see #";
124   protected final String JavaDoc TEXT_107 = "()";
125   protected final String JavaDoc TEXT_108 = NL + "\t * @see #set";
126   protected final String JavaDoc TEXT_109 = "(";
127   protected final String JavaDoc TEXT_110 = ")";
128   protected final String JavaDoc TEXT_111 = NL + "\t * @generated" + NL + "\t */" + NL + "\tvoid unset";
129   protected final String JavaDoc TEXT_112 = "();" + NL;
130   protected final String JavaDoc TEXT_113 = NL + "\t/**" + NL + "\t * Returns whether the value of the '{@link ";
131   protected final String JavaDoc TEXT_114 = "#";
132   protected final String JavaDoc TEXT_115 = " <em>";
133   protected final String JavaDoc TEXT_116 = "</em>}' ";
134   protected final String JavaDoc 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 JavaDoc TEXT_118 = "</em>' ";
136   protected final String JavaDoc TEXT_119 = " is set.";
137   protected final String JavaDoc TEXT_120 = NL + "\t * @see #unset";
138   protected final String JavaDoc TEXT_121 = "()";
139   protected final String JavaDoc TEXT_122 = NL + "\t * @see #";
140   protected final String JavaDoc TEXT_123 = "()";
141   protected final String JavaDoc TEXT_124 = NL + "\t * @see #set";
142   protected final String JavaDoc TEXT_125 = "(";
143   protected final String JavaDoc TEXT_126 = ")";
144   protected final String JavaDoc TEXT_127 = NL + "\t * @generated" + NL + "\t */" + NL + "\tboolean isSet";
145   protected final String JavaDoc TEXT_128 = "();" + NL;
146   protected final String JavaDoc TEXT_129 = NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->";
147   protected final String JavaDoc TEXT_130 = NL + "\t * <!-- begin-model-doc -->" + NL + "\t * ";
148   protected final String JavaDoc TEXT_131 = NL + "\t * <!-- end-model-doc -->";
149   protected final String JavaDoc TEXT_132 = NL + "\t * @model ";
150   protected final String JavaDoc TEXT_133 = NL + "\t * ";
151   protected final String JavaDoc TEXT_134 = NL + "\t * @model";
152   protected final String JavaDoc TEXT_135 = NL + "\t * @generated" + NL + "\t */" + NL + "\t";
153   protected final String JavaDoc TEXT_136 = " ";
154   protected final String JavaDoc TEXT_137 = "(";
155   protected final String JavaDoc TEXT_138 = ")";
156   protected final String JavaDoc TEXT_139 = ";" + NL;
157   protected final String JavaDoc TEXT_140 = NL + "} // ";
158   protected final String JavaDoc TEXT_141 = NL;
159
160   public String JavaDoc generate(Object JavaDoc argument)
161   {
162     StringBuffer JavaDoc stringBuffer = new StringBuffer JavaDoc();
163     
164 /**
165  * <copyright>
166  *
167  * Copyright (c) 2002-2005 IBM Corporation and others.
168  * All rights reserved. This program and the accompanying materials
169  * are made available under the terms of the Eclipse Public License v1.0
170  * which accompanies this distribution, and is available at
171  * http://www.eclipse.org/legal/epl-v10.html
172  *
173  * Contributors:
174  * IBM - Initial API and implementation
175  *
176  * </copyright>
177  */

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 JavaDoc 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 JavaDoc 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     //Interface/getGenFeature.override.javajetinc
370
}
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     //Interface/setGenFeature.override.javajetinc
409
}
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     //Interface/unsetGenFeature.override.javajetinc
439
}
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     //Interface/isSetGenFeature.override.javajetinc
473
}
474     //Interface/declaredGenFeature.override.javajetinc
475
}//for
476
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 JavaDoc 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     //Interface/declaredGenOperation.override.javajetinc
502
}//for
503
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