KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > ws > jaxme > js > ConditionalIndentationJavaSourceObject


1 /*
2  * Copyright 2003, 2004 The Apache Software Foundation
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15
16  */

17 package org.apache.ws.jaxme.js;
18
19 import java.io.IOException JavaDoc;
20 import java.util.Enumeration JavaDoc;
21 import java.util.Iterator JavaDoc;
22
23 /**
24  * @author <a HREF="mailto:joe@ispsoft.de">Jochen Wiedmann</a>
25  */

26 public abstract class ConditionalIndentationJavaSourceObject extends JavaSourceObject
27     implements ConditionalIndentationEngine {
28   private class LocalJavaFieldDeclaration {
29     LJFImpl field;
30     private LocalJavaFieldDeclaration(LJFImpl pField) {
31       field = pField;
32     }
33   }
34
35   public class LoopVariable implements DirectAccessible, IndentedObject {
36      private Object JavaDoc value;
37      private JavaQName type;
38      public LoopVariable(Object JavaDoc pValue, JavaQName pType) {
39         value = pValue;
40         type = pType;
41      }
42      public JavaQName getType() { return type; }
43      public boolean isNullable() { return false; }
44      public void setNullable(boolean pNullable) {
45        if (pNullable) {
46          throw new IllegalStateException JavaDoc("Loop variables cannot be nullable.");
47        }
48      }
49      public Object JavaDoc getValue() {
50         return value;
51      }
52      public void write(IndentationEngine pEngine, IndentationTarget pTarget)
53          throws IOException JavaDoc {
54        pEngine.write(pTarget, getValue());
55      }
56   }
57
58   public class LJFImpl extends JavaField implements LocalJavaField {
59     LJFImpl(JavaQName pType, String JavaDoc pName) {
60        super(pName, pType, null);
61     }
62     public void write(IndentationEngine pEngine, IndentationTarget pTarget)
63         throws IOException JavaDoc {
64       pEngine.write(pTarget, getName());
65     }
66   }
67
68   private int localVariableCounter = 0;
69
70   protected ConditionalIndentationJavaSourceObject
71       (String JavaDoc pName, JavaQName pType, JavaSource.Protection pProtection) {
72     super(pName, pType, pProtection);
73   }
74
75   public void addIf(Object JavaDoc[] pTokens) {
76      addLine("if (", pTokens, ") {");
77      indent();
78   }
79   public void addIf(Object JavaDoc pToken1) {
80      addIf(new Object JavaDoc[]{pToken1});
81   }
82   public void addIf(Object JavaDoc pToken1, Object JavaDoc pToken2) {
83      addIf(new Object JavaDoc[]{pToken1, pToken2});
84   }
85   public void addIf(Object JavaDoc pToken1, Object JavaDoc pToken2, Object JavaDoc pToken3) {
86      addIf(new Object JavaDoc[]{pToken1, pToken2, pToken3});
87   }
88   public void addIf(Object JavaDoc pToken1, Object JavaDoc pToken2, Object JavaDoc pToken3, Object JavaDoc pToken4) {
89      addIf(new Object JavaDoc[]{pToken1, pToken2, pToken3, pToken4});
90   }
91   public void addIf(Object JavaDoc pToken1, Object JavaDoc pToken2, Object JavaDoc pToken3, Object JavaDoc pToken4,
92                      Object JavaDoc pToken5) {
93      addIf(new Object JavaDoc[]{pToken1, pToken2, pToken3, pToken4, pToken5});
94   }
95   public void addIf(Object JavaDoc pToken1, Object JavaDoc pToken2, Object JavaDoc pToken3, Object JavaDoc pToken4,
96                             Object JavaDoc pToken5, Object JavaDoc pToken6) {
97      addIf(new Object JavaDoc[]{pToken1, pToken2, pToken3, pToken4, pToken5, pToken6});
98   }
99   public void addIf(Object JavaDoc pToken1, Object JavaDoc pToken2, Object JavaDoc pToken3, Object JavaDoc pToken4,
100                             Object JavaDoc pToken5, Object JavaDoc pToken6, Object JavaDoc pToken7) {
101      addIf(new Object JavaDoc[]{pToken1, pToken2, pToken3, pToken4, pToken5, pToken6,
102                               pToken7});
103   }
104   public void addIf(Object JavaDoc pToken1, Object JavaDoc pToken2, Object JavaDoc pToken3, Object JavaDoc pToken4,
105                             Object JavaDoc pToken5, Object JavaDoc pToken6, Object JavaDoc pToken7, Object JavaDoc pToken8) {
106      addIf(new Object JavaDoc[]{pToken1, pToken2, pToken3, pToken4, pToken5, pToken6,
107                               pToken7, pToken8});
108   }
109   public void addIf(Object JavaDoc pToken1, Object JavaDoc pToken2, Object JavaDoc pToken3, Object JavaDoc pToken4,
110                             Object JavaDoc pToken5, Object JavaDoc pToken6, Object JavaDoc pToken7, Object JavaDoc pToken8,
111                             Object JavaDoc pToken9) {
112      addIf(new Object JavaDoc[]{pToken1, pToken2, pToken3, pToken4, pToken5, pToken6,
113                               pToken7, pToken8, pToken9});
114   }
115   public void addIf(Object JavaDoc pToken1, Object JavaDoc pToken2, Object JavaDoc pToken3, Object JavaDoc pToken4,
116                             Object JavaDoc pToken5, Object JavaDoc pToken6, Object JavaDoc pToken7, Object JavaDoc pToken8,
117                             Object JavaDoc pToken9, Object JavaDoc pToken10) {
118      addIf(new Object JavaDoc[]{pToken1, pToken2, pToken3, pToken4, pToken5, pToken6,
119                               pToken7, pToken8, pToken9, pToken10});
120   }
121   public void addIf(Object JavaDoc pToken1, Object JavaDoc pToken2, Object JavaDoc pToken3, Object JavaDoc pToken4,
122                             Object JavaDoc pToken5, Object JavaDoc pToken6, Object JavaDoc pToken7, Object JavaDoc pToken8,
123                             Object JavaDoc pToken9, Object JavaDoc pToken10, Object JavaDoc pToken11) {
124      addIf(new Object JavaDoc[]{pToken1, pToken2, pToken3, pToken4, pToken5, pToken6,
125                               pToken7, pToken8, pToken9, pToken10, pToken11});
126   }
127   public void addIf(Object JavaDoc pToken1, Object JavaDoc pToken2, Object JavaDoc pToken3, Object JavaDoc pToken4,
128                             Object JavaDoc pToken5, Object JavaDoc pToken6, Object JavaDoc pToken7, Object JavaDoc pToken8,
129                             Object JavaDoc pToken9, Object JavaDoc pToken10, Object JavaDoc pToken11,
130                             Object JavaDoc pToken12) {
131      addIf(new Object JavaDoc[]{pToken1, pToken2, pToken3, pToken4, pToken5, pToken6,
132                               pToken7, pToken8, pToken9, pToken10, pToken11, pToken12});
133   }
134   public void addIf(Object JavaDoc pToken1, Object JavaDoc pToken2, Object JavaDoc pToken3, Object JavaDoc pToken4,
135                             Object JavaDoc pToken5, Object JavaDoc pToken6, Object JavaDoc pToken7, Object JavaDoc pToken8,
136                             Object JavaDoc pToken9, Object JavaDoc pToken10, Object JavaDoc pToken11,
137                             Object JavaDoc pToken12, Object JavaDoc pToken13) {
138      addIf(new Object JavaDoc[]{pToken1, pToken2, pToken3, pToken4, pToken5, pToken6,
139                               pToken7, pToken8, pToken9, pToken10, pToken11, pToken12,
140                               pToken13});
141   }
142   public void addIf(Object JavaDoc pToken1, Object JavaDoc pToken2, Object JavaDoc pToken3, Object JavaDoc pToken4,
143                             Object JavaDoc pToken5, Object JavaDoc pToken6, Object JavaDoc pToken7, Object JavaDoc pToken8,
144                             Object JavaDoc pToken9, Object JavaDoc pToken10, Object JavaDoc pToken11,
145                             Object JavaDoc pToken12, Object JavaDoc pToken13, Object JavaDoc pToken14) {
146      addIf(new Object JavaDoc[]{pToken1, pToken2, pToken3, pToken4, pToken5, pToken6,
147                               pToken7, pToken8, pToken9, pToken10, pToken11, pToken12,
148                               pToken13, pToken14});
149   }
150   public void addIf(Object JavaDoc pToken1, Object JavaDoc pToken2, Object JavaDoc pToken3, Object JavaDoc pToken4,
151                             Object JavaDoc pToken5, Object JavaDoc pToken6, Object JavaDoc pToken7, Object JavaDoc pToken8,
152                             Object JavaDoc pToken9, Object JavaDoc pToken10, Object JavaDoc pToken11,
153                             Object JavaDoc pToken12, Object JavaDoc pToken13, Object JavaDoc pToken14,
154                             Object JavaDoc pToken15) {
155      addIf(new Object JavaDoc[]{pToken1, pToken2, pToken3, pToken4, pToken5, pToken6,
156                               pToken7, pToken8, pToken9, pToken10, pToken11, pToken12,
157                               pToken13, pToken14, pToken15});
158   }
159
160   public void addElseIf(Object JavaDoc[] pTokens) {
161      unindent();
162      addLine("} else if (", pTokens, ") {");
163      indent();
164   }
165   public void addElseIf(Object JavaDoc pToken1) {
166      addElseIf(new Object JavaDoc[]{pToken1});
167   }
168   public void addElseIf(Object JavaDoc pToken1, Object JavaDoc pToken2) {
169      addElseIf(new Object JavaDoc[]{pToken1, pToken2});
170   }
171   public void addElseIf(Object JavaDoc pToken1, Object JavaDoc pToken2, Object JavaDoc pToken3) {
172      addElseIf(new Object JavaDoc[]{pToken1, pToken2, pToken3});
173   }
174   public void addElseIf(Object JavaDoc pToken1, Object JavaDoc pToken2, Object JavaDoc pToken3, Object JavaDoc pToken4) {
175      addElseIf(new Object JavaDoc[]{pToken1, pToken2, pToken3, pToken4});
176   }
177   public void addElseIf(Object JavaDoc pToken1, Object JavaDoc pToken2, Object JavaDoc pToken3, Object JavaDoc pToken4,
178                                 Object JavaDoc pToken5) {
179      addElseIf(new Object JavaDoc[]{pToken1, pToken2, pToken3, pToken4, pToken5});
180   }
181   public void addElseIf(Object JavaDoc pToken1, Object JavaDoc pToken2, Object JavaDoc pToken3, Object JavaDoc pToken4,
182                                 Object JavaDoc pToken5, Object JavaDoc pToken6) {
183      addElseIf(new Object JavaDoc[]{pToken1, pToken2, pToken3, pToken4, pToken5, pToken6});
184   }
185   public void addElseIf(Object JavaDoc pToken1, Object JavaDoc pToken2, Object JavaDoc pToken3, Object JavaDoc pToken4,
186                                 Object JavaDoc pToken5, Object JavaDoc pToken6, Object JavaDoc pToken7) {
187      addElseIf(new Object JavaDoc[]{pToken1, pToken2, pToken3, pToken4, pToken5, pToken6,
188                                   pToken7});
189   }
190   public void addElseIf(Object JavaDoc pToken1, Object JavaDoc pToken2, Object JavaDoc pToken3, Object JavaDoc pToken4,
191                                 Object JavaDoc pToken5, Object JavaDoc pToken6, Object JavaDoc pToken7, Object JavaDoc pToken8) {
192      addElseIf(new Object JavaDoc[]{pToken1, pToken2, pToken3, pToken4, pToken5, pToken6,
193                                   pToken7, pToken8});
194   }
195   public void addElseIf(Object JavaDoc pToken1, Object JavaDoc pToken2, Object JavaDoc pToken3, Object JavaDoc pToken4,
196                                 Object JavaDoc pToken5, Object JavaDoc pToken6, Object JavaDoc pToken7, Object JavaDoc pToken8,
197                                 Object JavaDoc pToken9) {
198      addElseIf(new Object JavaDoc[]{pToken1, pToken2, pToken3, pToken4, pToken5, pToken6,
199                                   pToken7, pToken8, pToken9});
200   }
201   public void addElseIf(Object JavaDoc pToken1, Object JavaDoc pToken2, Object JavaDoc pToken3, Object JavaDoc pToken4,
202                                 Object JavaDoc pToken5, Object JavaDoc pToken6, Object JavaDoc pToken7, Object JavaDoc pToken8,
203                                 Object JavaDoc pToken9, Object JavaDoc pToken10) {
204      addElseIf(new Object JavaDoc[]{pToken1, pToken2, pToken3, pToken4, pToken5, pToken6,
205                                   pToken7, pToken8, pToken9, pToken10});
206   }
207   public void addElseIf(Object JavaDoc pToken1, Object JavaDoc pToken2, Object JavaDoc pToken3, Object JavaDoc pToken4,
208                                 Object JavaDoc pToken5, Object JavaDoc pToken6, Object JavaDoc pToken7, Object JavaDoc pToken8,
209                                 Object JavaDoc pToken9, Object JavaDoc pToken10, Object JavaDoc pToken11) {
210      addElseIf(new Object JavaDoc[]{pToken1, pToken2, pToken3, pToken4, pToken5, pToken6,
211                                   pToken7, pToken8, pToken9, pToken10, pToken11});
212   }
213   public void addElseIf(Object JavaDoc pToken1, Object JavaDoc pToken2, Object JavaDoc pToken3, Object JavaDoc pToken4,
214                                 Object JavaDoc pToken5, Object JavaDoc pToken6, Object JavaDoc pToken7, Object JavaDoc pToken8,
215                                 Object JavaDoc pToken9, Object JavaDoc pToken10, Object JavaDoc pToken11,
216                                 Object JavaDoc pToken12) {
217      addElseIf(new Object JavaDoc[]{pToken1, pToken2, pToken3, pToken4, pToken5, pToken6,
218                                   pToken7, pToken8, pToken9, pToken10, pToken11, pToken12});
219   }
220   public void addElseIf(Object JavaDoc pToken1, Object JavaDoc pToken2, Object JavaDoc pToken3, Object JavaDoc pToken4,
221                                 Object JavaDoc pToken5, Object JavaDoc pToken6, Object JavaDoc pToken7, Object JavaDoc pToken8,
222                                 Object JavaDoc pToken9, Object JavaDoc pToken10, Object JavaDoc pToken11,
223                                 Object JavaDoc pToken12, Object JavaDoc pToken13) {
224      addElseIf(new Object JavaDoc[]{pToken1, pToken2, pToken3, pToken4, pToken5, pToken6,
225                                   pToken7, pToken8, pToken9, pToken10, pToken11, pToken12,
226                                   pToken13});
227   }
228   public void addElseIf(Object JavaDoc pToken1, Object JavaDoc pToken2, Object JavaDoc pToken3, Object JavaDoc pToken4,
229                                 Object JavaDoc pToken5, Object JavaDoc pToken6, Object JavaDoc pToken7, Object JavaDoc pToken8,
230                                 Object JavaDoc pToken9, Object JavaDoc pToken10, Object JavaDoc pToken11,
231                                 Object JavaDoc pToken12, Object JavaDoc pToken13, Object JavaDoc pToken14) {
232      addElseIf(new Object JavaDoc[]{pToken1, pToken2, pToken3, pToken4, pToken5, pToken6,
233                                   pToken7, pToken8, pToken9, pToken10, pToken11, pToken12,
234                                   pToken13, pToken14});
235   }
236   public void addElseIf(Object JavaDoc pToken1, Object JavaDoc pToken2, Object JavaDoc pToken3, Object JavaDoc pToken4,
237                                 Object JavaDoc pToken5, Object JavaDoc pToken6, Object JavaDoc pToken7, Object JavaDoc pToken8,
238                                 Object JavaDoc pToken9, Object JavaDoc pToken10, Object JavaDoc pToken11,
239                                 Object JavaDoc pToken12, Object JavaDoc pToken13, Object JavaDoc pToken14,
240                                 Object JavaDoc pToken15) {
241      addElseIf(new Object JavaDoc[]{pToken1, pToken2, pToken3, pToken4, pToken5, pToken6,
242                                   pToken7, pToken8, pToken9, pToken10, pToken11, pToken12,
243                                   pToken13, pToken14, pToken15});
244   }
245
246   public void addIf(boolean pFirst, Object JavaDoc[] pTokens) {
247      if (pFirst) {
248         addIf(pTokens);
249      } else {
250         addElseIf(pTokens);
251      }
252   }
253   public void addIf(boolean pFirst, Object JavaDoc pToken1) {
254      addIf(pFirst, new Object JavaDoc[]{pToken1});
255   }
256   public void addIf(boolean pFirst, Object JavaDoc pToken1, Object JavaDoc pToken2) {
257      addIf(pFirst, new Object JavaDoc[]{pToken1, pToken2});
258   }
259   public void addIf(boolean pFirst, Object JavaDoc pToken1, Object JavaDoc pToken2, Object JavaDoc pToken3) {
260      addIf(pFirst, new Object JavaDoc[]{pToken1, pToken2, pToken3});
261   }
262   public void addIf(boolean pFirst, Object JavaDoc pToken1, Object JavaDoc pToken2, Object JavaDoc pToken3,
263                      Object JavaDoc pToken4) {
264      addIf(pFirst, new Object JavaDoc[]{pToken1, pToken2, pToken3, pToken4});
265   }
266   public void addIf(boolean pFirst, Object JavaDoc pToken1, Object JavaDoc pToken2, Object JavaDoc pToken3,
267                      Object JavaDoc pToken4, Object JavaDoc pToken5) {
268      addIf(pFirst, new Object JavaDoc[]{pToken1, pToken2, pToken3, pToken4, pToken5});
269   }
270   public void addIf(boolean pFirst, Object JavaDoc pToken1, Object JavaDoc pToken2, Object JavaDoc pToken3,
271                      Object JavaDoc pToken4, Object JavaDoc pToken5, Object JavaDoc pToken6) {
272      addIf(pFirst, new Object JavaDoc[]{pToken1, pToken2, pToken3, pToken4, pToken5, pToken6});
273   }
274   public void addIf(boolean pFirst, Object JavaDoc pToken1, Object JavaDoc pToken2, Object JavaDoc pToken3,
275                      Object JavaDoc pToken4, Object JavaDoc pToken5, Object JavaDoc pToken6, Object JavaDoc pToken7) {
276      addIf(pFirst, new Object JavaDoc[]{pToken1, pToken2, pToken3, pToken4, pToken5, pToken6,
277                                       pToken7});
278   }
279   public void addIf(boolean pFirst, Object JavaDoc pToken1, Object JavaDoc pToken2, Object JavaDoc pToken3,
280                      Object JavaDoc pToken4, Object JavaDoc pToken5, Object JavaDoc pToken6, Object JavaDoc pToken7,
281                      Object JavaDoc pToken8) {
282      addIf(pFirst, new Object JavaDoc[]{pToken1, pToken2, pToken3, pToken4, pToken5, pToken6,
283                                       pToken7, pToken8});
284   }
285   public void addIf(boolean pFirst, Object JavaDoc pToken1, Object JavaDoc pToken2, Object JavaDoc pToken3,
286                      Object JavaDoc pToken4, Object JavaDoc pToken5, Object JavaDoc pToken6, Object JavaDoc pToken7,
287                      Object JavaDoc pToken8, Object JavaDoc pToken9) {
288      addIf(pFirst, new Object JavaDoc[]{pToken1, pToken2, pToken3, pToken4, pToken5, pToken6,
289                                  pToken7, pToken8, pToken9});
290   }
291   public void addIf(boolean pFirst, Object JavaDoc pToken1, Object JavaDoc pToken2, Object JavaDoc pToken3,
292                      Object JavaDoc pToken4, Object JavaDoc pToken5, Object JavaDoc pToken6, Object JavaDoc pToken7,
293                      Object JavaDoc pToken8, Object JavaDoc pToken9, Object JavaDoc pToken10) {
294      addIf(pFirst, new Object JavaDoc[]{pToken1, pToken2, pToken3, pToken4, pToken5, pToken6,
295                                  pToken7, pToken8, pToken9, pToken10});
296   }
297   public void addIf(boolean pFirst, Object JavaDoc pToken1, Object JavaDoc pToken2, Object JavaDoc pToken3,
298                      Object JavaDoc pToken4, Object JavaDoc pToken5, Object JavaDoc pToken6, Object JavaDoc pToken7,
299                      Object JavaDoc pToken8, Object JavaDoc pToken9, Object JavaDoc pToken10, Object JavaDoc pToken11) {
300      addIf(pFirst, new Object JavaDoc[]{pToken1, pToken2, pToken3, pToken4, pToken5, pToken6,
301                                       pToken7, pToken8, pToken9, pToken10, pToken11});
302   }
303   public void addIf(boolean pFirst, Object JavaDoc pToken1, Object JavaDoc pToken2, Object JavaDoc pToken3,
304                      Object JavaDoc pToken4, Object JavaDoc pToken5, Object JavaDoc pToken6, Object JavaDoc pToken7,
305                      Object JavaDoc pToken8, Object JavaDoc pToken9, Object JavaDoc pToken10, Object JavaDoc pToken11,
306                             Object JavaDoc pToken12) {
307      addIf(pFirst, new Object JavaDoc[]{pToken1, pToken2, pToken3, pToken4, pToken5, pToken6,
308                                  pToken7, pToken8, pToken9, pToken10, pToken11, pToken12});
309   }
310   public void addIf(boolean pFirst, Object JavaDoc pToken1, Object JavaDoc pToken2, Object JavaDoc pToken3,
311                      Object JavaDoc pToken4, Object JavaDoc pToken5, Object JavaDoc pToken6, Object JavaDoc pToken7,
312                      Object JavaDoc pToken8, Object JavaDoc pToken9, Object JavaDoc pToken10, Object JavaDoc pToken11,
313                             Object JavaDoc pToken12, Object JavaDoc pToken13) {
314      addIf(pFirst, new Object JavaDoc[]{pToken1, pToken2, pToken3, pToken4, pToken5, pToken6,
315                                       pToken7, pToken8, pToken9, pToken10, pToken11, pToken12,
316                                       pToken13});
317   }
318   public void addIf(boolean pFirst, Object JavaDoc pToken1, Object JavaDoc pToken2, Object JavaDoc pToken3,
319                      Object JavaDoc pToken4, Object JavaDoc pToken5, Object JavaDoc pToken6, Object JavaDoc pToken7,
320                      Object JavaDoc pToken8, Object JavaDoc pToken9, Object JavaDoc pToken10, Object JavaDoc pToken11,
321                             Object JavaDoc pToken12, Object JavaDoc pToken13, Object JavaDoc pToken14) {
322      addIf(pFirst, new Object JavaDoc[]{pToken1, pToken2, pToken3, pToken4, pToken5, pToken6,
323                                  pToken7, pToken8, pToken9, pToken10, pToken11, pToken12,
324                                  pToken13, pToken14});
325   }
326   public void addIf(boolean pFirst, Object JavaDoc pToken1, Object JavaDoc pToken2, Object JavaDoc pToken3,
327                      Object JavaDoc pToken4, Object JavaDoc pToken5, Object JavaDoc pToken6, Object JavaDoc pToken7,
328                      Object JavaDoc pToken8, Object JavaDoc pToken9, Object JavaDoc pToken10, Object JavaDoc pToken11,
329                             Object JavaDoc pToken12, Object JavaDoc pToken13, Object JavaDoc pToken14, Object JavaDoc pToken15) {
330      addIf(pFirst, new Object JavaDoc[]{pToken1, pToken2, pToken3, pToken4, pToken5, pToken6,
331                                pToken7, pToken8, pToken9, pToken10, pToken11, pToken12,
332                                       pToken13, pToken14, pToken15});
333   }
334
335   public void addElse() {
336      unindent();
337      addLine("} else {");
338      indent();
339   }
340
341   public void addEndIf() {
342      unindent();
343      addLine("}");
344   }
345
346   public void addThrowNew(JavaQName pExceptionClass, Object JavaDoc[] pArgs) {
347     addLine("throw new ", pExceptionClass, "(", pArgs, ");");
348   }
349   public void addThrowNew(JavaQName pExceptionClass, Object JavaDoc pToken1) {
350      addThrowNew(pExceptionClass, new Object JavaDoc[]{pToken1});
351   }
352   public void addThrowNew(JavaQName pExceptionClass, Object JavaDoc pToken1, Object JavaDoc pToken2) {
353      addThrowNew(pExceptionClass, new Object JavaDoc[]{pToken1, pToken2});
354   }
355   public void addThrowNew(JavaQName pExceptionClass, Object JavaDoc pToken1, Object JavaDoc pToken2,
356                            Object JavaDoc pToken3) {
357      addThrowNew(pExceptionClass, new Object JavaDoc[]{pToken1, pToken2, pToken3});
358   }
359   public void addThrowNew(JavaQName pExceptionClass, Object JavaDoc pToken1, Object JavaDoc pToken2,
360                            Object JavaDoc pToken3, Object JavaDoc pToken4) {
361      addThrowNew(pExceptionClass, new Object JavaDoc[]{pToken1, pToken2, pToken3, pToken4});
362   }
363   public void addThrowNew(JavaQName pExceptionClass, Object JavaDoc pToken1, Object JavaDoc pToken2,
364                            Object JavaDoc pToken3, Object JavaDoc pToken4, Object JavaDoc pToken5) {
365      addThrowNew(pExceptionClass,
366                  new Object JavaDoc[]{pToken1, pToken2, pToken3, pToken4, pToken5});
367   }
368   public void addThrowNew(JavaQName pExceptionClass, Object JavaDoc pToken1, Object JavaDoc pToken2,
369                            Object JavaDoc pToken3, Object JavaDoc pToken4, Object JavaDoc pToken5, Object JavaDoc pToken6) {
370      addThrowNew(pExceptionClass,
371                  new Object JavaDoc[]{pToken1, pToken2, pToken3, pToken4, pToken5, pToken6});
372   }
373   public void addThrowNew(JavaQName pExceptionClass, Object JavaDoc pToken1, Object JavaDoc pToken2,
374                            Object JavaDoc pToken3, Object JavaDoc pToken4, Object JavaDoc pToken5, Object JavaDoc pToken6,
375                            Object JavaDoc pToken7) {
376      addThrowNew(pExceptionClass,
377                  new Object JavaDoc[]{pToken1, pToken2, pToken3, pToken4, pToken5, pToken6,
378                                     pToken7});
379   }
380   public void addThrowNew(JavaQName pExceptionClass, Object JavaDoc pToken1, Object JavaDoc pToken2,
381                            Object JavaDoc pToken3, Object JavaDoc pToken4, Object JavaDoc pToken5, Object JavaDoc pToken6,
382                            Object JavaDoc pToken7, Object JavaDoc pToken8) {
383      addThrowNew(pExceptionClass,
384                  new Object JavaDoc[]{pToken1, pToken2, pToken3, pToken4, pToken5, pToken6,
385                                     pToken7, pToken8});
386   }
387   public void addThrowNew(JavaQName pExceptionClass, Object JavaDoc pToken1, Object JavaDoc pToken2,
388                            Object JavaDoc pToken3, Object JavaDoc pToken4, Object JavaDoc pToken5, Object JavaDoc pToken6,
389                            Object JavaDoc pToken7, Object JavaDoc pToken8,
390                             Object JavaDoc pToken9) {
391      addThrowNew(pExceptionClass,
392                  new Object JavaDoc[]{pToken1, pToken2, pToken3, pToken4, pToken5, pToken6,
393                                     pToken7, pToken8, pToken9});
394   }
395   public void addThrowNew(JavaQName pExceptionClass, Object JavaDoc pToken1, Object JavaDoc pToken2,
396                            Object JavaDoc pToken3, Object JavaDoc pToken4, Object JavaDoc pToken5, Object JavaDoc pToken6,
397                            Object JavaDoc pToken7, Object JavaDoc pToken8, Object JavaDoc pToken9, Object JavaDoc pToken10) {
398      addThrowNew(pExceptionClass,
399                  new Object JavaDoc[]{pToken1, pToken2, pToken3, pToken4, pToken5, pToken6,
400                                     pToken7, pToken8, pToken9, pToken10});
401   }
402   public void addThrowNew(JavaQName pExceptionClass, Object JavaDoc pToken1, Object JavaDoc pToken2,
403                            Object JavaDoc pToken3, Object JavaDoc pToken4, Object JavaDoc pToken5, Object JavaDoc pToken6,
404                            Object JavaDoc pToken7, Object JavaDoc pToken8, Object JavaDoc pToken9, Object JavaDoc pToken10,
405                            Object JavaDoc pToken11) {
406      addThrowNew(pExceptionClass,
407                  new Object JavaDoc[]{pToken1, pToken2, pToken3, pToken4, pToken5, pToken6,
408                                     pToken7, pToken8, pToken9, pToken10, pToken11});
409   }
410   public void addThrowNew(JavaQName pExceptionClass, Object JavaDoc pToken1, Object JavaDoc pToken2,
411                            Object JavaDoc pToken3, Object JavaDoc pToken4, Object JavaDoc pToken5, Object JavaDoc pToken6,
412                            Object JavaDoc pToken7, Object JavaDoc pToken8, Object JavaDoc pToken9, Object JavaDoc pToken10,
413                            Object JavaDoc pToken11, Object JavaDoc pToken12) {
414      addThrowNew(pExceptionClass,
415                  new Object JavaDoc[]{pToken1, pToken2, pToken3, pToken4, pToken5, pToken6,
416                                     pToken7, pToken8, pToken9, pToken10, pToken11, pToken12});
417   }
418   public void addThrowNew(JavaQName pExceptionClass, Object JavaDoc pToken1, Object JavaDoc pToken2,
419                            Object JavaDoc pToken3, Object JavaDoc pToken4, Object JavaDoc pToken5, Object JavaDoc pToken6,
420                            Object JavaDoc pToken7, Object JavaDoc pToken8, Object JavaDoc pToken9, Object JavaDoc pToken10,
421                            Object JavaDoc pToken11, Object JavaDoc pToken12, Object JavaDoc pToken13) {
422      addThrowNew(pExceptionClass,
423                  new Object JavaDoc[]{pToken1, pToken2, pToken3, pToken4, pToken5, pToken6,
424                                     pToken7, pToken8, pToken9, pToken10, pToken11, pToken12,
425                                     pToken13});
426   }
427   public void addThrowNew(JavaQName pExceptionClass, Object JavaDoc pToken1, Object JavaDoc pToken2,
428                            Object JavaDoc pToken3, Object JavaDoc pToken4, Object JavaDoc pToken5, Object JavaDoc pToken6,
429                            Object JavaDoc pToken7, Object JavaDoc pToken8, Object JavaDoc pToken9, Object JavaDoc pToken10,
430                            Object JavaDoc pToken11, Object JavaDoc pToken12, Object JavaDoc pToken13,
431                            Object JavaDoc pToken14) {
432      addThrowNew(pExceptionClass,
433                  new Object JavaDoc[]{pToken1, pToken2, pToken3, pToken4, pToken5, pToken6,
434                                     pToken7, pToken8, pToken9, pToken10, pToken11, pToken12,
435                                     pToken13, pToken14});
436   }
437   public void addThrowNew(JavaQName pExceptionClass, Object JavaDoc pToken1, Object JavaDoc pToken2,
438                            Object JavaDoc pToken3, Object JavaDoc pToken4, Object JavaDoc pToken5, Object JavaDoc pToken6,
439                            Object JavaDoc pToken7, Object JavaDoc pToken8, Object JavaDoc pToken9, Object JavaDoc pToken10,
440                            Object JavaDoc pToken11, Object JavaDoc pToken12, Object JavaDoc pToken13,
441                            Object JavaDoc pToken14, Object JavaDoc pToken15) {
442      addThrowNew(pExceptionClass,
443                  new Object JavaDoc[]{pToken1, pToken2, pToken3, pToken4, pToken5, pToken6,
444                                     pToken7, pToken8, pToken9, pToken10, pToken11, pToken12,
445                                     pToken13, pToken14, pToken15});
446   }
447
448   public void addThrowNew(Class JavaDoc pExceptionClass, Object JavaDoc[] pArgs) {
449      addThrowNew(JavaQNameImpl.getInstance(pExceptionClass), pArgs);
450   }
451   public void addThrowNew(Class JavaDoc pExceptionClass, Object JavaDoc pToken1) {
452      addThrowNew(pExceptionClass, new Object JavaDoc[]{pToken1});
453   }
454   public void addThrowNew(Class JavaDoc pExceptionClass, Object JavaDoc pToken1, Object JavaDoc pToken2) {
455      addThrowNew(pExceptionClass, new Object JavaDoc[]{pToken1, pToken2});
456   }
457   public void addThrowNew(Class JavaDoc pExceptionClass, Object JavaDoc pToken1, Object JavaDoc pToken2,
458                                     Object JavaDoc pToken3) {
459      addThrowNew(pExceptionClass, new Object JavaDoc[]{pToken1, pToken2, pToken3});
460   }
461   public void addThrowNew(Class JavaDoc pExceptionClass, Object JavaDoc pToken1, Object JavaDoc pToken2,
462                                     Object JavaDoc pToken3, Object JavaDoc pToken4) {
463      addThrowNew(pExceptionClass, new Object JavaDoc[]{pToken1, pToken2, pToken3, pToken4});
464   }
465   public void addThrowNew(Class JavaDoc pExceptionClass, Object JavaDoc pToken1, Object JavaDoc pToken2,
466                                     Object JavaDoc pToken3, Object JavaDoc pToken4, Object JavaDoc pToken5) {
467      addThrowNew(pExceptionClass,
468                      new Object JavaDoc[]{pToken1, pToken2, pToken3, pToken4, pToken5});
469   }
470   public void addThrowNew(Class JavaDoc pExceptionClass, Object JavaDoc pToken1, Object JavaDoc pToken2,
471                                     Object JavaDoc pToken3, Object JavaDoc pToken4, Object JavaDoc pToken5, Object JavaDoc pToken6) {
472      addThrowNew(pExceptionClass,
473                      new Object JavaDoc[]{pToken1, pToken2, pToken3, pToken4, pToken5, pToken6});
474   }
475   public void addThrowNew(Class JavaDoc pExceptionClass, Object JavaDoc pToken1, Object JavaDoc pToken2,
476                                     Object JavaDoc pToken3, Object JavaDoc pToken4, Object JavaDoc pToken5, Object JavaDoc pToken6,
477                                     Object JavaDoc pToken7) {
478      addThrowNew(pExceptionClass,
479                      new Object JavaDoc[]{pToken1, pToken2, pToken3, pToken4, pToken5, pToken6,
480                                       pToken7});
481   }
482   public void addThrowNew(Class JavaDoc pExceptionClass, Object JavaDoc pToken1, Object JavaDoc pToken2,
483                                     Object JavaDoc pToken3, Object JavaDoc pToken4, Object JavaDoc pToken5, Object JavaDoc pToken6,
484                                     Object JavaDoc pToken7, Object JavaDoc pToken8) {
485      addThrowNew(pExceptionClass,
486                      new Object JavaDoc[]{pToken1, pToken2, pToken3, pToken4, pToken5, pToken6,
487                                       pToken7, pToken8});
488   }
489   public void addThrowNew(Class JavaDoc pExceptionClass, Object JavaDoc pToken1, Object JavaDoc pToken2,
490                                     Object JavaDoc pToken3, Object JavaDoc pToken4, Object JavaDoc pToken5, Object JavaDoc pToken6,
491                                     Object JavaDoc pToken7, Object JavaDoc pToken8,
492                             Object JavaDoc pToken9) {
493      addThrowNew(pExceptionClass,
494                      new Object JavaDoc[]{pToken1, pToken2, pToken3, pToken4, pToken5, pToken6,
495                                       pToken7, pToken8, pToken9});
496   }
497   public void addThrowNew(Class JavaDoc pExceptionClass, Object JavaDoc pToken1, Object JavaDoc pToken2,
498                                     Object JavaDoc pToken3, Object JavaDoc pToken4, Object JavaDoc pToken5, Object JavaDoc pToken6,
499                                     Object JavaDoc pToken7, Object JavaDoc pToken8, Object JavaDoc pToken9, Object JavaDoc pToken10) {
500      addThrowNew(pExceptionClass,
501                      new Object JavaDoc[]{pToken1, pToken2, pToken3, pToken4, pToken5, pToken6,
502                                       pToken7, pToken8, pToken9, pToken10});
503   }
504   public void addThrowNew(Class JavaDoc pExceptionClass, Object JavaDoc pToken1, Object JavaDoc pToken2,
505                                     Object JavaDoc pToken3, Object JavaDoc pToken4, Object JavaDoc pToken5, Object JavaDoc pToken6,
506                                     Object JavaDoc pToken7, Object JavaDoc pToken8, Object JavaDoc pToken9, Object JavaDoc pToken10,
507                                     Object JavaDoc pToken11) {
508      addThrowNew(pExceptionClass,
509                      new Object JavaDoc[]{pToken1, pToken2, pToken3, pToken4, pToken5, pToken6,
510                                       pToken7, pToken8, pToken9, pToken10, pToken11});
511   }
512   public void addThrowNew(Class JavaDoc pExceptionClass, Object JavaDoc pToken1, Object JavaDoc pToken2,
513                                     Object JavaDoc pToken3, Object JavaDoc pToken4, Object JavaDoc pToken5, Object JavaDoc pToken6,
514                                     Object JavaDoc pToken7, Object JavaDoc pToken8, Object JavaDoc pToken9, Object JavaDoc pToken10,
515                                     Object JavaDoc pToken11, Object JavaDoc pToken12) {
516      addThrowNew(pExceptionClass,
517                      new Object JavaDoc[]{pToken1, pToken2, pToken3, pToken4, pToken5, pToken6,
518                                       pToken7, pToken8, pToken9, pToken10, pToken11, pToken12});
519   }
520   public void addThrowNew(Class JavaDoc pExceptionClass, Object JavaDoc pToken1, Object JavaDoc pToken2,
521                                     Object JavaDoc pToken3, Object JavaDoc pToken4, Object JavaDoc pToken5, Object JavaDoc pToken6,
522                                     Object JavaDoc pToken7, Object JavaDoc pToken8, Object JavaDoc pToken9, Object JavaDoc pToken10,
523                                     Object JavaDoc pToken11, Object JavaDoc pToken12, Object JavaDoc pToken13) {
524      addThrowNew(pExceptionClass,
525                      new Object JavaDoc[]{pToken1, pToken2, pToken3, pToken4, pToken5, pToken6,
526                                       pToken7, pToken8, pToken9, pToken10, pToken11, pToken12,
527                                       pToken13});
528   }
529   public void addThrowNew(Class JavaDoc pExceptionClass, Object JavaDoc pToken1, Object JavaDoc pToken2,
530                                     Object JavaDoc pToken3, Object JavaDoc pToken4, Object JavaDoc pToken5, Object JavaDoc pToken6,
531                                     Object JavaDoc pToken7, Object JavaDoc pToken8, Object JavaDoc pToken9, Object JavaDoc pToken10,
532                                     Object JavaDoc pToken11, Object JavaDoc pToken12, Object JavaDoc pToken13,
533                                     Object JavaDoc pToken14) {
534      addThrowNew(pExceptionClass,
535                      new Object JavaDoc[]{pToken1, pToken2, pToken3, pToken4, pToken5, pToken6,
536                                       pToken7, pToken8, pToken9, pToken10, pToken11, pToken12,
537                                       pToken13, pToken14});
538   }
539   public void addThrowNew(Class JavaDoc pExceptionClass, Object JavaDoc pToken1, Object JavaDoc pToken2,
540                                     Object JavaDoc pToken3, Object JavaDoc pToken4, Object JavaDoc pToken5, Object JavaDoc pToken6,
541                                     Object JavaDoc pToken7, Object JavaDoc pToken8, Object JavaDoc pToken9, Object JavaDoc pToken10,
542                                     Object JavaDoc pToken11, Object JavaDoc pToken12, Object JavaDoc pToken13,
543                                     Object JavaDoc pToken14, Object JavaDoc pToken15) {
544      addThrowNew(pExceptionClass,
545                      new Object JavaDoc[]{pToken1, pToken2, pToken3, pToken4, pToken5, pToken6,
546                                       pToken7, pToken8, pToken9, pToken10, pToken11, pToken12,
547                                       pToken13, pToken14, pToken15});
548   }
549
550   public void addTry() {
551     addLine("try {");
552     indent();
553   }
554   public DirectAccessible addCatch(JavaQName pExceptionClass, Object JavaDoc pVar) {
555     unindent();
556     addLine("} catch (", pExceptionClass, " ", pVar, ") {");
557     indent();
558     return new LoopVariable(pVar, pExceptionClass);
559   }
560   public DirectAccessible addCatch(Class JavaDoc pExceptionClass, Object JavaDoc pVar) {
561     return addCatch(JavaQNameImpl.getInstance(pExceptionClass), pVar);
562   }
563   public DirectAccessible addCatch(JavaQName pExceptionClass) {
564     return addCatch(pExceptionClass, getLocalVariableName());
565   }
566   public DirectAccessible addCatch(Class JavaDoc pExceptionClass) {
567     return addCatch(pExceptionClass, getLocalVariableName());
568   }
569   public void addFinally() {
570     unindent();
571     addLine("} finally {");
572     indent();
573   }
574   public void addEndTry() {
575     unindent();
576     addLine("}");
577   }
578
579
580   public void addFor(Object JavaDoc[] pArgs) {
581     addLine("for (", pArgs, ") {");
582     indent();
583   }
584
585
586   public DirectAccessible addForArray(JavaQName pVarClass, Object JavaDoc pVar, Object JavaDoc pArray) {
587     addFor(new Object JavaDoc[]{pVarClass, " ", pVar, " = 0; ",
588                         pVar, " < (", pArray, ").length; ",
589                         pVar, "++"});
590     return new LoopVariable(pVar, pVarClass);
591   }
592   public DirectAccessible addForArray(Class JavaDoc pVarClass, Object JavaDoc pVar, Object JavaDoc pArray) {
593     return addForArray(JavaQNameImpl.getInstance(pVarClass), pVar, pArray);
594   }
595   public DirectAccessible addForArray(Object JavaDoc pVar, Object JavaDoc pArray) {
596     return addForArray(int.class, pVar, pArray);
597   }
598   public DirectAccessible addForArray(JavaQName pVarClass, Object JavaDoc pArray) {
599     return addForArray(pVarClass, getLocalVariableName(), pArray);
600   }
601   public DirectAccessible addForArray(Class JavaDoc pVarClass, Object JavaDoc pArray) {
602     return addForArray(pVarClass, getLocalVariableName(), pArray);
603   }
604   public DirectAccessible addForArray(Object JavaDoc pArray) {
605     return addForArray(int.class, pArray);
606   }
607
608   public DirectAccessible addForList(JavaQName pVarClass, Object JavaDoc pVar, Object JavaDoc pList) {
609     addFor(new Object JavaDoc[]{pVarClass, " ", pVar, " = 0; ", pVar, " < (", pList,
610                          ").size(); ", pVar, "++"});
611     return new LoopVariable(pVar, pVarClass);
612   }
613   public DirectAccessible addForList(Class JavaDoc pVarClass, Object JavaDoc pVar, Object JavaDoc pList) {
614     return addForList(JavaQNameImpl.getInstance(pVarClass), pVar, pList);
615   }
616   public DirectAccessible addForList(Object JavaDoc pVar, Object JavaDoc pList) {
617     return addForList(int.class, pVar, pList);
618   }
619   public DirectAccessible addForList(JavaQName pVarClass, Object JavaDoc pList) {
620     return addForList(pVarClass, getLocalVariableName(), pList);
621   }
622   public DirectAccessible addForList(Class JavaDoc pVarClass, Object JavaDoc pList) {
623      return addForList(pVarClass, getLocalVariableName(), pList);
624   }
625   public DirectAccessible addForList(Object JavaDoc pList) {
626     return addForList(int.class, pList);
627   }
628
629
630   public DirectAccessible addForIterator(JavaQName pVarClass, Object JavaDoc pVar, Object JavaDoc pIterator) {
631     addFor(new Object JavaDoc[]{pVarClass, " ", pVar, " = ", pIterator, "; ", pVar,
632                         ".hasNext(); "});
633     return new LoopVariable(pVar, pVarClass);
634   }
635   public DirectAccessible addForIterator(Class JavaDoc pVarClass, Object JavaDoc pVar, Object JavaDoc pIterator) {
636     return addForIterator(JavaQNameImpl.getInstance(pVarClass), pVar, pIterator);
637   }
638   public DirectAccessible addForIterator(Object JavaDoc pVar, Object JavaDoc pIterator) {
639     return addForIterator(Iterator JavaDoc.class, pVar, pIterator);
640   }
641   public DirectAccessible addForIterator(JavaQName pVarClass, Object JavaDoc pIterator) {
642     return addForIterator(pVarClass, getLocalVariableName(), pIterator);
643   }
644   public DirectAccessible addForIterator(Class JavaDoc pVarClass, Object JavaDoc pIterator) {
645     return addForIterator(pVarClass, getLocalVariableName(), pIterator);
646   }
647   public DirectAccessible addForIterator(Object JavaDoc pIterator) {
648     return addForIterator(Iterator JavaDoc.class, pIterator);
649   }
650
651   public DirectAccessible addForEnumeration(JavaQName pVarClass, Object JavaDoc pVar, Object JavaDoc pEnumeration) {
652     addFor(new Object JavaDoc[]{pVarClass, " ", pVar, " = ", pEnumeration, "; ", pVar,
653                         ".hasMoreElements(); "});
654     return new LoopVariable(pVar, pVarClass);
655   }
656   public DirectAccessible addForEnumeration(Class JavaDoc pVarClass, Object JavaDoc pVar, Object JavaDoc pEnumeration) {
657     return addForEnumeration(JavaQNameImpl.getInstance(pVarClass), pVar, pEnumeration);
658   }
659   public DirectAccessible addForEnumeration(Object JavaDoc pVar, Object JavaDoc pEnumeration) {
660     return addForEnumeration(Enumeration JavaDoc.class, pVar, pEnumeration);
661   }
662   public DirectAccessible addForEnumeration(JavaQName pVarClass, Object JavaDoc pEnumeration) {
663     return addForEnumeration(pVarClass, getLocalVariableName(), pEnumeration);
664   }
665   public DirectAccessible addForEnumeration(Class JavaDoc pVarClass, Object JavaDoc pEnumeration) {
666     return addForEnumeration(pVarClass, getLocalVariableName(), pEnumeration);
667   }
668   public DirectAccessible addForEnumeration(Object JavaDoc pEnumeration) {
669     return addForEnumeration(Enumeration JavaDoc.class, pEnumeration);
670   }
671
672   public DirectAccessible addForCollection(JavaQName pVarClass, Object JavaDoc pVar, Object JavaDoc pCollection) {
673     return addForIterator(pVarClass, pVar, new Object JavaDoc[]{"(", pCollection, ").iterator()"});
674   }
675   public DirectAccessible addForCollection(Class JavaDoc pVarClass, Object JavaDoc pVar, Object JavaDoc pCollection) {
676     return addForCollection(JavaQNameImpl.getInstance(pVarClass), pVar, pCollection);
677   }
678   public DirectAccessible addForCollection(Object JavaDoc pVar, Object JavaDoc pCollection) {
679     return addForCollection(Iterator JavaDoc.class, pVar, pCollection);
680   }
681   public DirectAccessible addForCollection(JavaQName pVarClass, Object JavaDoc pCollection) {
682     return addForCollection(pVarClass, getLocalVariableName(), pCollection);
683   }
684   public DirectAccessible addForCollection(Class JavaDoc pVarClass, Object JavaDoc pCollection) {
685     return addForCollection(pVarClass, getLocalVariableName(), pCollection);
686   }
687   public DirectAccessible addForCollection(Object JavaDoc pCollection) {
688     return addForCollection(Iterator JavaDoc.class, pCollection);
689   }
690
691   public void addEndFor() {
692     unindent();
693     addLine("}");
694   }
695   public void addFor(Object JavaDoc pToken1) {
696     addFor(new Object JavaDoc[]{pToken1});
697   }
698   public void addFor(Object JavaDoc pToken1, Object JavaDoc pToken2) {
699     addFor(new Object JavaDoc[]{pToken1, pToken2});
700   }
701   public void addFor(Object JavaDoc pToken1, Object JavaDoc pToken2, Object JavaDoc pToken3) {
702     addFor(new Object JavaDoc[]{pToken1, pToken2, pToken3});
703   }
704   public void addFor(Object JavaDoc pToken1, Object JavaDoc pToken2, Object JavaDoc pToken3, Object JavaDoc pToken4) {
705     addFor(new Object JavaDoc[]{pToken1, pToken2, pToken3, pToken4});
706   }
707   public void addFor(Object JavaDoc pToken1, Object JavaDoc pToken2, Object JavaDoc pToken3, Object JavaDoc pToken4,
708                       Object JavaDoc pToken5) {
709     addFor(new Object JavaDoc[]{pToken1, pToken2, pToken3, pToken4, pToken5});
710   }
711   public void addFor(Object JavaDoc pToken1, Object JavaDoc pToken2, Object JavaDoc pToken3, Object JavaDoc pToken4,
712                       Object JavaDoc pToken5, Object JavaDoc pToken6) {
713     addFor(new Object JavaDoc[]{pToken1, pToken2, pToken3, pToken4, pToken5, pToken6});
714   }
715   public void addFor(Object JavaDoc pToken1, Object JavaDoc pToken2, Object JavaDoc pToken3, Object JavaDoc pToken4,
716                       Object JavaDoc pToken5, Object JavaDoc pToken6, Object JavaDoc pToken7) {
717     addFor(new Object JavaDoc[]{pToken1, pToken2, pToken3, pToken4, pToken5, pToken6,
718                          pToken7});
719   }
720   public void addFor(Object JavaDoc pToken1, Object JavaDoc pToken2, Object JavaDoc pToken3, Object JavaDoc pToken4,
721                       Object JavaDoc pToken5, Object JavaDoc pToken6, Object JavaDoc pToken7, Object JavaDoc pToken8) {
722     addFor(new Object JavaDoc[]{pToken1, pToken2, pToken3, pToken4, pToken5, pToken6,
723                          pToken7, pToken8});
724   }
725   public void addFor(Object JavaDoc pToken1, Object JavaDoc pToken2, Object JavaDoc pToken3, Object JavaDoc pToken4,
726                       Object JavaDoc pToken5, Object JavaDoc pToken6, Object JavaDoc pToken7, Object JavaDoc pToken8,
727                       Object JavaDoc pToken9) {
728     addFor(new Object JavaDoc[]{pToken1, pToken2, pToken3, pToken4, pToken5, pToken6,
729                          pToken7, pToken8, pToken9});
730   }
731   public void addFor(Object JavaDoc pToken1, Object JavaDoc pToken2, Object JavaDoc pToken3, Object JavaDoc pToken4,
732                       Object JavaDoc pToken5, Object JavaDoc pToken6, Object JavaDoc pToken7, Object JavaDoc pToken8,
733                       Object JavaDoc pToken9, Object JavaDoc pToken10) {
734     addFor(new Object JavaDoc[]{pToken1, pToken2, pToken3, pToken4, pToken5, pToken6,
735                          pToken7, pToken8, pToken9, pToken10});
736   }
737   public void addFor(Object JavaDoc pToken1, Object JavaDoc pToken2, Object JavaDoc pToken3, Object JavaDoc pToken4,
738                       Object JavaDoc pToken5, Object JavaDoc pToken6, Object JavaDoc pToken7, Object JavaDoc pToken8,
739                       Object JavaDoc pToken9, Object JavaDoc pToken10, Object JavaDoc pToken11) {
740     addFor(new Object JavaDoc[]{pToken1, pToken2, pToken3, pToken4, pToken5, pToken6,
741                          pToken7, pToken8, pToken9, pToken10, pToken11});
742   }
743   public void addFor(Object JavaDoc pToken1, Object JavaDoc pToken2, Object JavaDoc pToken3, Object JavaDoc pToken4,
744                       Object JavaDoc pToken5, Object JavaDoc pToken6, Object JavaDoc pToken7, Object JavaDoc pToken8,
745                       Object JavaDoc pToken9, Object JavaDoc pToken10, Object JavaDoc pToken11, Object JavaDoc pToken12) {
746     addFor(new Object JavaDoc[]{pToken1, pToken2, pToken3, pToken4, pToken5, pToken6,
747                          pToken7, pToken8, pToken9, pToken10, pToken11, pToken12});
748   }
749   public void addFor(Object JavaDoc pToken1, Object JavaDoc pToken2, Object JavaDoc pToken3, Object JavaDoc pToken4,
750                       Object JavaDoc pToken5, Object JavaDoc pToken6, Object JavaDoc pToken7, Object JavaDoc pToken8,
751                       Object JavaDoc pToken9, Object JavaDoc pToken10, Object JavaDoc pToken11, Object JavaDoc pToken12,
752                       Object JavaDoc pToken13) {
753     addFor(new Object JavaDoc[]{pToken1, pToken2, pToken3, pToken4, pToken5, pToken6,
754                          pToken7, pToken8, pToken9, pToken10, pToken11, pToken12,
755                          pToken13});
756   }
757   public void addFor(Object JavaDoc pToken1, Object JavaDoc pToken2, Object JavaDoc pToken3, Object JavaDoc pToken4,
758                       Object JavaDoc pToken5, Object JavaDoc pToken6, Object JavaDoc pToken7, Object JavaDoc pToken8,
759                       Object JavaDoc pToken9, Object JavaDoc pToken10, Object JavaDoc pToken11, Object JavaDoc pToken12,
760                       Object JavaDoc pToken13, Object JavaDoc pToken14) {
761     addFor(new Object JavaDoc[]{pToken1, pToken2, pToken3, pToken4, pToken5, pToken6,
762                          pToken7, pToken8, pToken9, pToken10, pToken11, pToken12,
763                          pToken13, pToken14});
764   }
765   public void addFor(Object JavaDoc pToken1, Object JavaDoc pToken2, Object JavaDoc pToken3, Object JavaDoc pToken4,
766                       Object JavaDoc pToken5, Object JavaDoc pToken6, Object JavaDoc pToken7, Object JavaDoc pToken8,
767                       Object JavaDoc pToken9, Object JavaDoc pToken10, Object JavaDoc pToken11, Object JavaDoc pToken12,
768                       Object JavaDoc pToken13, Object JavaDoc pToken14, Object JavaDoc pToken15) {
769     addFor(new Object JavaDoc[]{pToken1, pToken2, pToken3, pToken4, pToken5, pToken6,
770                          pToken7, pToken8, pToken9, pToken10, pToken11, pToken12,
771                          pToken13, pToken14, pToken15});
772   }
773
774   /** <p>Shortcut for <code>addLine("while (", pExpr, ") {"); indent();</code>.</p>
775    */

776   public void addWhile(Object JavaDoc[] pExpr) {
777      addLine("while (", pExpr, ") {");
778      indent();
779   }
780   /** <p>Shortcut for <code>addWhile(new Object[]{"(", pIterator, ").hasNext()"});</code>
781    */

782   public void addWhileIterator(Object JavaDoc pIterator) {
783      addWhile(new Object JavaDoc[]{"(", pIterator, ").hasNext()"});
784   }
785   /** <p>Shortcut for <code>unindent(); addLine("}");</code>.</p>
786    */

787   public void addEndWhile() {
788      unindent();
789      addLine("}");
790   }
791   public void addWhile(Object JavaDoc pToken1) {
792     addWhile(new Object JavaDoc[]{pToken1});
793   }
794   public void addWhile(Object JavaDoc pToken1, Object JavaDoc pToken2) {
795     addWhile(new Object JavaDoc[]{pToken1, pToken2});
796   }
797   public void addWhile(Object JavaDoc pToken1, Object JavaDoc pToken2, Object JavaDoc pToken3) {
798     addWhile(new Object JavaDoc[]{pToken1, pToken2, pToken3});
799   }
800   public void addWhile(Object JavaDoc pToken1, Object JavaDoc pToken2, Object JavaDoc pToken3, Object JavaDoc pToken4) {
801     addWhile(new Object JavaDoc[]{pToken1, pToken2, pToken3, pToken4});
802   }
803   public void addWhile(Object JavaDoc pToken1, Object JavaDoc pToken2, Object JavaDoc pToken3, Object JavaDoc pToken4,
804                       Object JavaDoc pToken5) {
805     addWhile(new Object JavaDoc[]{pToken1, pToken2, pToken3, pToken4, pToken5});
806   }
807   public void addWhile(Object JavaDoc pToken1, Object JavaDoc pToken2, Object JavaDoc pToken3, Object JavaDoc pToken4,
808                       Object JavaDoc pToken5, Object JavaDoc pToken6) {
809     addWhile(new Object JavaDoc[]{pToken1, pToken2, pToken3, pToken4, pToken5, pToken6});
810   }
811   public void addWhile(Object JavaDoc pToken1, Object JavaDoc pToken2, Object JavaDoc pToken3, Object JavaDoc pToken4,
812                       Object JavaDoc pToken5, Object JavaDoc pToken6, Object JavaDoc pToken7) {
813     addWhile(new Object JavaDoc[]{pToken1, pToken2, pToken3, pToken4, pToken5, pToken6,
814                           pToken7});
815   }
816   public void addWhile(Object JavaDoc pToken1, Object JavaDoc pToken2, Object JavaDoc pToken3, Object JavaDoc pToken4,
817                       Object JavaDoc pToken5, Object JavaDoc pToken6, Object JavaDoc pToken7, Object JavaDoc pToken8) {
818     addWhile(new Object JavaDoc[]{pToken1, pToken2, pToken3, pToken4, pToken5, pToken6,
819                           pToken7, pToken8});
820   }
821   public void addWhile(Object JavaDoc pToken1, Object JavaDoc pToken2, Object JavaDoc pToken3, Object JavaDoc pToken4,
822                       Object JavaDoc pToken5, Object JavaDoc pToken6, Object JavaDoc pToken7, Object JavaDoc pToken8,
823                       Object JavaDoc pToken9) {
824     addWhile(new Object JavaDoc[]{pToken1, pToken2, pToken3, pToken4, pToken5, pToken6,
825                           pToken7, pToken8, pToken9});
826   }
827   public void addWhile(Object JavaDoc pToken1, Object JavaDoc pToken2, Object JavaDoc pToken3, Object JavaDoc pToken4,
828                       Object JavaDoc pToken5, Object JavaDoc pToken6, Object JavaDoc pToken7, Object JavaDoc pToken8,
829                       Object JavaDoc pToken9, Object JavaDoc pToken10) {
830     addWhile(new Object JavaDoc[]{pToken1, pToken2, pToken3, pToken4, pToken5, pToken6,
831                           pToken7, pToken8, pToken9, pToken10});
832   }
833   public void addWhile(Object JavaDoc pToken1, Object JavaDoc pToken2, Object JavaDoc pToken3, Object JavaDoc pToken4,
834                       Object JavaDoc pToken5, Object JavaDoc pToken6, Object JavaDoc pToken7, Object JavaDoc pToken8,
835                       Object JavaDoc pToken9, Object JavaDoc pToken10, Object JavaDoc pToken11) {
836     addWhile(new Object JavaDoc[]{pToken1, pToken2, pToken3, pToken4, pToken5, pToken6,
837                           pToken7, pToken8, pToken9, pToken10, pToken11});
838   }
839   public void addWhile(Object JavaDoc pToken1, Object JavaDoc pToken2, Object JavaDoc pToken3, Object JavaDoc pToken4,
840                       Object JavaDoc pToken5, Object JavaDoc pToken6, Object JavaDoc pToken7, Object JavaDoc pToken8,
841                       Object JavaDoc pToken9, Object JavaDoc pToken10, Object JavaDoc pToken11, Object JavaDoc pToken12) {
842     addWhile(new Object JavaDoc[]{pToken1, pToken2, pToken3, pToken4, pToken5, pToken6,
843                           pToken7, pToken8, pToken9, pToken10, pToken11, pToken12});
844   }
845   public void addWhile(Object JavaDoc pToken1, Object JavaDoc pToken2, Object JavaDoc pToken3, Object JavaDoc pToken4,
846                       Object JavaDoc pToken5, Object JavaDoc pToken6, Object JavaDoc pToken7, Object JavaDoc pToken8,
847                       Object JavaDoc pToken9, Object JavaDoc pToken10, Object JavaDoc pToken11, Object JavaDoc pToken12,
848                       Object JavaDoc pToken13) {
849     addWhile(new Object JavaDoc[]{pToken1, pToken2, pToken3, pToken4, pToken5, pToken6,
850                           pToken7, pToken8, pToken9, pToken10, pToken11, pToken12,
851                          pToken13});
852   }
853   public void addWhile(Object JavaDoc pToken1, Object JavaDoc pToken2, Object JavaDoc pToken3, Object JavaDoc pToken4,
854                       Object JavaDoc pToken5, Object JavaDoc pToken6, Object JavaDoc pToken7, Object JavaDoc pToken8,
855                       Object JavaDoc pToken9, Object JavaDoc pToken10, Object JavaDoc pToken11, Object JavaDoc pToken12,
856                       Object JavaDoc pToken13, Object JavaDoc pToken14) {
857     addWhile(new Object JavaDoc[]{pToken1, pToken2, pToken3, pToken4, pToken5, pToken6,
858                           pToken7, pToken8, pToken9, pToken10, pToken11, pToken12,
859                           pToken13, pToken14});
860   }
861   public void addWhile(Object JavaDoc pToken1, Object JavaDoc pToken2, Object JavaDoc pToken3, Object JavaDoc pToken4,
862                       Object JavaDoc pToken5, Object JavaDoc pToken6, Object JavaDoc pToken7, Object JavaDoc pToken8,
863                       Object JavaDoc pToken9, Object JavaDoc pToken10, Object JavaDoc pToken11, Object JavaDoc pToken12,
864                       Object JavaDoc pToken13, Object JavaDoc pToken14, Object JavaDoc pToken15) {
865     addWhile(new Object JavaDoc[]{pToken1, pToken2, pToken3, pToken4, pToken5, pToken6,
866                           pToken7, pToken8, pToken9, pToken10, pToken11, pToken12,
867                          pToken13, pToken14, pToken15});
868   }
869
870   public void addSwitch(Object JavaDoc[] pTokens) {
871     addLine("switch (", pTokens, ") {");
872     indent();
873     indent();
874   }
875   public void addSwitch(Object JavaDoc pToken1) {
876     addSwitch(new Object JavaDoc[]{pToken1});
877   }
878   public void addSwitch(Object JavaDoc pToken1, Object JavaDoc pToken2) {
879     addSwitch(new Object JavaDoc[]{pToken1, pToken2});
880   }
881   public void addSwitch(Object JavaDoc pToken1, Object JavaDoc pToken2, Object JavaDoc pToken3) {
882     addSwitch(new Object JavaDoc[]{pToken1, pToken2, pToken3});
883   }
884   public void addSwitch(Object JavaDoc pToken1, Object JavaDoc pToken2, Object JavaDoc pToken3,
885             Object JavaDoc pToken4) {
886     addSwitch(new Object JavaDoc[]{pToken1, pToken2, pToken3, pToken4});
887   }
888   public void addSwitch(Object JavaDoc pToken1, Object JavaDoc pToken2, Object JavaDoc pToken3,
889             Object JavaDoc pToken4, Object JavaDoc pToken5) {
890     addSwitch(new Object JavaDoc[]{pToken1, pToken2, pToken3, pToken4, pToken5});
891   }
892   public void addSwitch(Object JavaDoc pToken1, Object JavaDoc pToken2, Object JavaDoc pToken3,
893             Object JavaDoc pToken4, Object JavaDoc pToken5, Object JavaDoc pToken6) {
894     addSwitch(new Object JavaDoc[]{pToken1, pToken2, pToken3, pToken4, pToken5,
895                pToken6});
896   }
897   public void addSwitch(Object JavaDoc pToken1, Object JavaDoc pToken2, Object JavaDoc pToken3,
898             Object JavaDoc pToken4, Object JavaDoc pToken5, Object JavaDoc pToken6,
899             Object JavaDoc pToken7) {
900     addSwitch(new Object JavaDoc[]{pToken1, pToken2, pToken3, pToken4, pToken5,
901                pToken6, pToken7});
902   }
903   public void addSwitch(Object JavaDoc pToken1, Object JavaDoc pToken2, Object JavaDoc pToken3,
904             Object JavaDoc pToken4, Object JavaDoc pToken5, Object JavaDoc pToken6,
905             Object JavaDoc pToken7, Object JavaDoc pToken8) {
906     addSwitch(new Object JavaDoc[]{pToken1, pToken2, pToken3, pToken4, pToken5,
907                pToken6, pToken7, pToken8});
908   }
909   public void addSwitch(Object JavaDoc pToken1, Object JavaDoc pToken2, Object JavaDoc pToken3,
910             Object JavaDoc pToken4, Object JavaDoc pToken5, Object JavaDoc pToken6,
911             Object JavaDoc pToken7, Object JavaDoc pToken8, Object JavaDoc pToken9) {
912     addSwitch(new Object JavaDoc[]{pToken1, pToken2, pToken3, pToken4, pToken5,
913                pToken6, pToken7, pToken8, pToken9});
914   }
915   public void addSwitch(Object JavaDoc pToken1, Object JavaDoc pToken2, Object JavaDoc pToken3,
916             Object JavaDoc pToken4, Object JavaDoc pToken5, Object JavaDoc pToken6,
917             Object JavaDoc pToken7, Object JavaDoc pToken8, Object JavaDoc pToken9,
918             Object JavaDoc pToken10) {
919     addSwitch(new Object JavaDoc[]{pToken1, pToken2, pToken3, pToken4, pToken5,
920                pToken6, pToken7, pToken8, pToken9, pToken10});
921   }
922   public void addSwitch(Object JavaDoc pToken1, Object JavaDoc pToken2, Object JavaDoc pToken3,
923             Object JavaDoc pToken4, Object JavaDoc pToken5, Object JavaDoc pToken6,
924             Object JavaDoc pToken7, Object JavaDoc pToken8, Object JavaDoc pToken9,
925             Object JavaDoc pToken10, Object JavaDoc pToken11) {
926     addSwitch(new Object JavaDoc[]{pToken1, pToken2, pToken3, pToken4, pToken5,
927                pToken6, pToken7, pToken8, pToken9, pToken10,
928                pToken11});
929   }
930   public void addSwitch(Object JavaDoc pToken1, Object JavaDoc pToken2, Object JavaDoc pToken3,
931             Object JavaDoc pToken4, Object JavaDoc pToken5, Object JavaDoc pToken6,
932             Object JavaDoc pToken7, Object JavaDoc pToken8, Object JavaDoc pToken9,
933             Object JavaDoc pToken10, Object JavaDoc pToken11, Object JavaDoc pToken12) {
934     addSwitch(new Object JavaDoc[]{pToken1, pToken2, pToken3, pToken4, pToken5,
935                pToken6, pToken7, pToken8, pToken9, pToken10,
936                pToken11, pToken12});
937   }
938   public void addSwitch(Object JavaDoc pToken1, Object JavaDoc pToken2, Object JavaDoc pToken3,
939             Object JavaDoc pToken4, Object JavaDoc pToken5, Object JavaDoc pToken6,
940             Object JavaDoc pToken7, Object JavaDoc pToken8, Object JavaDoc pToken9,
941             Object JavaDoc pToken10, Object JavaDoc pToken11, Object JavaDoc pToken12,
942             Object JavaDoc pToken13) {
943     addSwitch(new Object JavaDoc[]{pToken1, pToken2, pToken3, pToken4, pToken5,
944                pToken6, pToken7, pToken8, pToken9, pToken10,
945                pToken11, pToken12, pToken13});
946   }
947   public void addSwitch(Object JavaDoc pToken1, Object JavaDoc pToken2, Object JavaDoc pToken3,
948             Object JavaDoc pToken4, Object JavaDoc pToken5, Object JavaDoc pToken6,
949             Object JavaDoc pToken7, Object JavaDoc pToken8, Object JavaDoc pToken9,
950             Object JavaDoc pToken10, Object JavaDoc pToken11, Object JavaDoc pToken12,
951             Object JavaDoc pToken13, Object JavaDoc pToken14) {
952     addSwitch(new Object JavaDoc[]{pToken1, pToken2, pToken3, pToken4, pToken5,
953                pToken6, pToken7, pToken8, pToken9, pToken10,
954                pToken11, pToken12, pToken13, pToken14});
955   }
956   public void addSwitch(Object JavaDoc pToken1, Object JavaDoc pToken2, Object JavaDoc pToken3,
957             Object JavaDoc pToken4, Object JavaDoc pToken5, Object JavaDoc pToken6,
958             Object JavaDoc pToken7, Object JavaDoc pToken8, Object JavaDoc pToken9,
959             Object JavaDoc pToken10, Object JavaDoc pToken11, Object JavaDoc pToken12,
960             Object JavaDoc pToken13, Object JavaDoc pToken14, Object JavaDoc pToken15) {
961     addSwitch(new Object JavaDoc[]{pToken1, pToken2, pToken3, pToken4, pToken5,
962                pToken6, pToken7, pToken8, pToken9, pToken10,
963                pToken11, pToken12, pToken13, pToken14, pToken15});
964   }
965
966   public void addCase(Object JavaDoc[] pTokens) {
967     unindent();
968     addLine("case ", pTokens, ":");
969     indent();
970   }
971   public void addCase(Object JavaDoc pToken1) {
972     addCase(new Object JavaDoc[]{pToken1});
973   }
974   public void addCase(Object JavaDoc pToken1, Object JavaDoc pToken2) {
975     addCase(new Object JavaDoc[]{pToken1, pToken2});
976   }
977   public void addCase(Object JavaDoc pToken1, Object JavaDoc pToken2, Object JavaDoc pToken3) {
978     addCase(new Object JavaDoc[]{pToken1, pToken2, pToken3});
979   }
980   public void addCase(Object JavaDoc pToken1, Object JavaDoc pToken2, Object JavaDoc pToken3,
981               Object JavaDoc pToken4) {
982     addCase(new Object JavaDoc[]{pToken1, pToken2, pToken3, pToken4});
983   }
984   public void addCase(Object JavaDoc pToken1, Object JavaDoc pToken2, Object JavaDoc pToken3,
985               Object JavaDoc pToken4, Object JavaDoc pToken5) {
986     addCase(new Object JavaDoc[]{pToken1, pToken2, pToken3, pToken4, pToken5});
987   }
988   public void addCase(Object JavaDoc pToken1, Object JavaDoc pToken2, Object JavaDoc pToken3,
989               Object JavaDoc pToken4, Object JavaDoc pToken5, Object JavaDoc pToken6) {
990     addCase(new Object JavaDoc[]{pToken1, pToken2, pToken3, pToken4, pToken5, pToken6});
991   }
992   public void addCase(Object JavaDoc pToken1, Object JavaDoc pToken2, Object JavaDoc pToken3,
993               Object JavaDoc pToken4, Object JavaDoc pToken5, Object JavaDoc pToken6,
994               Object JavaDoc pToken7) {
995     addCase(new Object JavaDoc[]{pToken1, pToken2, pToken3, pToken4, pToken5, pToken6,
996              pToken7});
997   }
998   public void addCase(Object JavaDoc pToken1, Object JavaDoc pToken2, Object JavaDoc pToken3,
999               Object JavaDoc pToken4, Object JavaDoc pToken5, Object JavaDoc pToken6,
1000              Object JavaDoc pToken7, Object JavaDoc pToken8) {
1001    addCase(new Object JavaDoc[]{pToken1, pToken2, pToken3, pToken4, pToken5, pToken6,
1002             pToken7, pToken8});
1003  }
1004  public void addCase(Object JavaDoc pToken1, Object JavaDoc pToken2, Object JavaDoc pToken3,
1005              Object JavaDoc pToken4, Object JavaDoc pToken5, Object JavaDoc pToken6,
1006              Object JavaDoc pToken7, Object JavaDoc pToken8, Object JavaDoc pToken9) {
1007    addCase(new Object JavaDoc[]{pToken1, pToken2, pToken3, pToken4, pToken5, pToken6,
1008             pToken7, pToken8, pToken9});
1009  }
1010  public void addCase(Object JavaDoc pToken1, Object JavaDoc pToken2, Object JavaDoc pToken3,
1011              Object JavaDoc pToken4, Object JavaDoc pToken5, Object JavaDoc pToken6,
1012              Object JavaDoc pToken7, Object JavaDoc pToken8, Object JavaDoc pToken9,
1013              Object JavaDoc pToken10) {
1014    addCase(new Object JavaDoc[]{pToken1, pToken2, pToken3, pToken4, pToken5, pToken6,
1015             pToken7, pToken8, pToken9, pToken10});
1016  }
1017  public void addCase(Object JavaDoc pToken1, Object JavaDoc pToken2, Object JavaDoc pToken3,
1018              Object JavaDoc pToken4, Object JavaDoc pToken5, Object JavaDoc pToken6,
1019              Object JavaDoc pToken7, Object JavaDoc pToken8, Object JavaDoc pToken9,
1020              Object JavaDoc pToken10, Object JavaDoc pToken11) {
1021    addCase(new Object JavaDoc[]{pToken1, pToken2, pToken3, pToken4, pToken5, pToken6,
1022             pToken7, pToken8, pToken9, pToken10, pToken11});
1023  }
1024  public void addCase(Object JavaDoc pToken1, Object JavaDoc pToken2, Object JavaDoc pToken3,
1025              Object JavaDoc pToken4, Object JavaDoc pToken5, Object JavaDoc pToken6,
1026              Object JavaDoc pToken7, Object JavaDoc pToken8, Object JavaDoc pToken9,
1027              Object JavaDoc pToken10, Object JavaDoc pToken11, Object JavaDoc pToken12) {
1028    addCase(new Object JavaDoc[]{pToken1, pToken2, pToken3, pToken4, pToken5, pToken6,
1029             pToken7, pToken8, pToken9, pToken10, pToken11,
1030             pToken12});
1031  }
1032  public void addCase(Object JavaDoc pToken1, Object JavaDoc pToken2, Object JavaDoc pToken3,
1033              Object JavaDoc pToken4, Object JavaDoc pToken5, Object JavaDoc pToken6,
1034              Object JavaDoc pToken7, Object JavaDoc pToken8, Object JavaDoc pToken9,
1035              Object JavaDoc pToken10, Object JavaDoc pToken11, Object JavaDoc pToken12,
1036              Object JavaDoc pToken13) {
1037    addCase(new Object JavaDoc[]{pToken1, pToken2, pToken3, pToken4, pToken5, pToken6,
1038             pToken7, pToken8, pToken9, pToken10, pToken11,
1039             pToken12, pToken13});
1040  }
1041  public void addCase(Object JavaDoc pToken1, Object JavaDoc pToken2, Object JavaDoc pToken3,
1042              Object JavaDoc pToken4, Object JavaDoc pToken5, Object JavaDoc pToken6,
1043              Object JavaDoc pToken7, Object JavaDoc pToken8, Object JavaDoc pToken9,
1044              Object JavaDoc pToken10, Object JavaDoc pToken11, Object JavaDoc pToken12,
1045              Object JavaDoc pToken13, Object JavaDoc pToken14) {
1046    addCase(new Object JavaDoc[]{pToken1, pToken2, pToken3, pToken4, pToken5, pToken6,
1047             pToken7, pToken8, pToken9, pToken10, pToken11,
1048             pToken12, pToken13, pToken14});
1049  }
1050  public void addCase(Object JavaDoc pToken1, Object JavaDoc pToken2, Object JavaDoc pToken3,
1051              Object JavaDoc pToken4, Object JavaDoc pToken5, Object JavaDoc pToken6,
1052              Object JavaDoc pToken7, Object JavaDoc pToken8, Object JavaDoc pToken9,
1053              Object JavaDoc pToken10, Object JavaDoc pToken11, Object JavaDoc pToken12,
1054              Object JavaDoc pToken13, Object JavaDoc pToken14, Object JavaDoc pToken15) {
1055    addCase(new Object JavaDoc[]{pToken1, pToken2, pToken3, pToken4, pToken5, pToken6,
1056             pToken7, pToken8, pToken9, pToken10, pToken11,
1057             pToken12, pToken13, pToken14, pToken15});
1058  }
1059
1060  public void addDefault() {
1061    unindent();
1062    addLine("default:");
1063    indent();
1064  }
1065
1066  public void addBreak() {
1067    addLine("break;");
1068  }
1069
1070  public void addEndSwitch() {
1071    unindent();
1072    unindent();
1073    addLine("}");
1074  }
1075  public String JavaDoc getLocalVariableName() {
1076    return "_" + ++localVariableCounter;
1077  }
1078
1079  protected abstract void writeHeader(IndentationTarget pTarget)
1080    throws IOException JavaDoc;
1081
1082  public void write(IndentationTarget pTarget) throws IOException JavaDoc {
1083    JavaComment jc = getComment();
1084    if (jc != null) {
1085      jc.write(pTarget);
1086      pTarget.indent(0);
1087    }
1088    writeHeader(pTarget);
1089    if (!pTarget.isInterface() && !isAbstract()) {
1090      super.write(new IncreasingTarget(pTarget));
1091      pTarget.indent(0);
1092      pTarget.write("}");
1093      pTarget.write();
1094    }
1095  }
1096
1097  public void write(IndentationTarget pTarget, Object JavaDoc pObject)
1098        throws IOException JavaDoc {
1099    if (pObject instanceof LocalJavaFieldDeclaration) {
1100      LJFImpl f = ((LocalJavaFieldDeclaration) pObject).field;
1101      f.writeNoEol(pTarget);
1102    } else {
1103      super.write(pTarget, pObject);
1104    }
1105  }
1106
1107  /** <p>Creates a new {@link LocalJavaField} with the given class and name,
1108   * which is not final.</p>
1109   */

1110  public LocalJavaField newJavaField(Class JavaDoc pType, String JavaDoc pName) {
1111     return newJavaField(JavaQNameImpl.getInstance(pType), pName);
1112  }
1113
1114  /** <p>Creates a new {@link LocalJavaField} with the given class and
1115   * name.</p>
1116   */

1117  public LocalJavaField newJavaField(JavaQName pType, String JavaDoc pName) {
1118    LJFImpl result = new LJFImpl(pType, pName);
1119    addLine(new LocalJavaFieldDeclaration(result));
1120    return result;
1121  }
1122
1123  /** <p>Creates a new {@link LocalJavaField} with the given class, which is
1124   * not final. The field name will be generated using
1125   * {@link #getLocalVariableName()}.</p>
1126   */

1127  public LocalJavaField newJavaField(JavaQName pType) {
1128    return newJavaField(pType, getLocalVariableName());
1129  }
1130
1131  /** <p>Creates a new {@link LocalJavaField} with the given class, which is
1132   * not final. The field name will be generated using
1133   * {@link #getLocalVariableName()}.</p>
1134   */

1135  public LocalJavaField newJavaField(Class JavaDoc pType) {
1136    return newJavaField(pType, getLocalVariableName());
1137  }
1138}
1139
Popular Tags