KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > j2biz > pencil > test > scenario > impl > FieldScopes


1 /*
2  * Copyright 2004 Andreas Siebert (j2biz community)
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 package com.j2biz.pencil.test.scenario.impl;
17
18 import com.j2biz.pencil.test.additional.FieldScopesSuperClass;
19 import com.j2biz.pencil.test.additional.TestInterface1;
20 import com.j2biz.pencil.test.additional.TestLog;
21
22 /**
23  * This class tests public attribute.
24  *
25  * @TODO: check if-scopes
26  * @TODO: check method-in-method shadowing
27  * @TODO: shadowing über unterschiedliche werte testen.
28  */

29 public class FieldScopes extends FieldScopesSuperClass {
30
31     /**
32      * this field is needed to test a call of a global declared variable in
33      * different scopes.
34      */

35     public int field1 = new Integer JavaDoc(1).intValue();
36
37     /**
38      * this field is needed to test a shadowing of a global declared variable.
39      */

40     public int field2 = new Integer JavaDoc(2).intValue();
41
42     /**
43      * this field is also needed to test shadowing, but only for "local" scopes.
44      * with local-scope i mean a scope inside a simple { }-block, which is
45      * placed inside a method.
46      */

47     public int field3 = new Integer JavaDoc(3).intValue();
48
49     /**
50      * this field is to test shadowing of attributes with an parameter.
51      */

52     public int field4 = new Integer JavaDoc(4).intValue();
53
54     /**
55      * this field is needed to test the shadowing of an attribute in a
56      * super-class with an attribute in this instace wich has the same name.
57      */

58     public int field5 = new Integer JavaDoc(5).intValue();
59
60     /**
61      * this field is to test visibility of a private field in the superclass.
62      */

63     public int field6_HOLDER = new Integer JavaDoc(6).intValue();
64
65     /**
66      * this field is to test the visibility of a protected field in the superclass.
67      */

68     public int field7_HOLDER = new Integer JavaDoc(7).intValue();
69
70     /**
71      * this field is needed to test a call of a static variable
72      */

73     public static int field8 = new Integer JavaDoc(8).intValue();
74
75     /**
76      * this field is needed to test a visibility of a private field in the
77      * enclosing instance
78      */

79     private int field9 = new Integer JavaDoc(9).intValue();
80
81     /**
82      * this field is needed to test a visibility of a static private field in
83      * the enclosing instance
84      */

85     private static int field10 = new Integer JavaDoc(10).intValue();
86
87
88     /**
89      * <clinit>has not parameters. this means, that shadowing wof an attribute
90      * with a parameter is unpossible.
91      */

92     static {
93         int field2 = new Integer JavaDoc(20).intValue();
94
95         TestLog.debug("GlobalPublic.<clinit>().this.field1 = ${this.field1}"); // n.v.
96
TestLog.debug("GlobalPublic.<clinit>().field1 = ${field1}"); // n.v.
97
TestLog.debug("GlobalPublic.<clinit>().field2 = " + field2);
98         TestLog.debug("GlobalPublic.<clinit>().field5 = ${field5}");
99         TestLog.debug("GlobalPublic.<clinit>().field6 = ${field6}");
100         TestLog.debug("GlobalPublic.<clinit>().field7 = ${field7}");
101         TestLog.debug("GlobalPublic.<clinit>().field8 = " + field8);
102         TestLog.debug("GlobalPublic.<clinit>().field9 = ${field9}");
103         TestLog.debug("GlobalPublic.<clinit>().field10 = " + field10);
104         {
105             int field3 = new Integer JavaDoc(30).intValue();
106             TestLog
107                     .debug("GlobalPublic.<clinit>().<local>.field1 = ${field1} "); // n.v.
108
TestLog
109                     .debug("GlobalPublic.<clinit>().<local>.this.field1 = ${this.field1} "); // n.v.
110
TestLog.debug("GlobalPublic.<clinit>().<local>.field2 = " + field2);
111             TestLog.debug("GlobalPublic.<clinit>().<local>.field3 = " + field3);
112             TestLog.debug("GlobalPublic.<clinit>().<local>.field5 = ${field5}");
113             TestLog.debug("GlobalPublic.<clinit>().<local>.field6 = ${field6}");
114             TestLog.debug("GlobalPublic.<clinit>().<local>.field7 = ${field7}");
115             TestLog.debug("GlobalPublic.<clinit>().<local>.field8 = " + field8);
116             TestLog.debug("GlobalPublic.<clinit>().<local>.field9 = ${field9}");
117             TestLog.debug("GlobalPublic.<clinit>().<local>.field10 = "
118                     + field10);
119         }
120     }
121
122     {
123         TestLog.debug("GlobalPublic.<init>().this.field1 = " + this.field1);
124         TestLog.debug("GlobalPublic.<init>().field1 = " + field1);
125
126         int field2 = new Integer JavaDoc(20).intValue();
127         TestLog.debug("GlobalPublic.<init>().field2 = " + field2);
128         TestLog.debug("GlobalPublic.<init>().field5 = " + field5);
129         TestLog.debug("GlobalPublic.<init>().field6 = ${field6}" );
130         TestLog.debug("GlobalPublic.<init>().field7 = " + field7 );
131         TestLog.debug("GlobalPublic.<init>().field8 = " + field8);
132         TestLog.debug("GlobalPublic.<init>().field9 = " + field9);
133         TestLog.debug("GlobalPublic.<init>().field10 = " + field10);
134         {
135             TestLog.debug("GlobalPublic.<init>().<local>.field1 = " + field1);
136             TestLog.debug("GlobalPublic.<init>().<local>.this.field1 = "
137                     + field1);
138             TestLog.debug("GlobalPublic.<init>().<local>.field2 = " + field2);
139
140             int field3 = new Integer JavaDoc(30).intValue();
141             TestLog.debug("GlobalPublic.<init>().<local>.field3 = " + field3);
142             TestLog.debug("GlobalPublic.<init>().<local>.field5 = " + field5);
143             TestLog.debug("GlobalPublic.<init>().<local>.field6 = ${field6}");
144             TestLog.debug("GlobalPublic.<init>().<local>.field7 = " + field7);
145             TestLog.debug("GlobalPublic.<init>().<local>.field8 = " + field8);
146             TestLog.debug("GlobalPublic.<init>().<local>.field9 = " + field9);
147             TestLog.debug("GlobalPublic.<init>().<local>.field10 = " + field10);
148         }
149
150         new InnerClass().nonStaticMethod(new Integer JavaDoc(40).intValue());
151
152         class NonStaticEmbeddedClass {
153             {
154                 TestLog.debug("NonStaticEmbeddedClass.<init>.field1 = "
155                         + field1);
156                 TestLog.debug("NonStaticEmbeddedClass.<init>.field5 = "
157                         + field5);
158                 TestLog.debug("NonStaticEmbeddedClass.<init>.field6 = ${field6}");
159                 TestLog.debug("NonStaticEmbeddedClass.<init>.field7 = " + field7);
160                 TestLog.debug("NonStaticEmbeddedClass.<init>.field9 = "
161                         + field9);
162                 TestLog.debug("NonStaticEmbeddedClass.<init>.field10 = "
163                         + field10);
164             }
165         }
166     }
167
168     public static void main(String JavaDoc[] args) {
169         TestLog.debug("GlobalPublic.main().field1 = ${field1} "); // n.v.
170
TestLog.debug("GlobalPublic.main().this.field1 = ${this.field1} "); // n.v.
171

172         int field2 = new Integer JavaDoc(20).intValue();
173         TestLog.debug("GlobalPublic.main().field2 = " + field2);
174         TestLog.debug("GlobalPublic.main().field5 = ${field5}");
175         TestLog.debug("GlobalPublic.main().field6 = ${field6}");
176         TestLog.debug("GlobalPublic.main().field8 = " + field8);
177         TestLog.debug("GlobalPublic.main().field9 = ${field9}");
178         TestLog.debug("GlobalPublic.main().field10 = " + field10);
179         {
180             TestLog.debug("GlobalPublic.main().<local>.field1 = ${field1}"); // n.v.
181
TestLog
182                     .debug("GlobalPublic.main().<local>.this.field1 = ${this.field1}"); // n.v.
183

184             int field3 = new Integer JavaDoc(30).intValue();
185             TestLog.debug("GlobalPublic.main().<local>.field2 = " + field2);
186             TestLog.debug("GlobalPublic.main().<local>.field3 = " + field3);
187             TestLog.debug("GlobalPublic.main().<local>.field5 = ${field5}");
188             TestLog.debug("GlobalPublic.main().<local>.field6 = ${field6}");
189             TestLog.debug("GlobalPublic.main().<local>.field8 = " + field8);
190             TestLog.debug("GlobalPublic.main().<local>.field9 = ${field9}");
191             TestLog.debug("GlobalPublic.main().<local>.field10 = " + field10);
192         }
193
194         final FieldScopes app = new FieldScopes();
195         app.nonStaticMethod(new Integer JavaDoc(40).intValue());
196
197         staticMethod(new Integer JavaDoc(40).intValue());
198
199         class EmbeddedClass {
200             {
201                 TestLog
202                         .debug("GlobalPublic.EmbeddedClass.<init>().field1 = ${field1}"); // n.v.
203
TestLog
204                         .debug("GlobalPublic.EmbeddedClass.<init>().this.field1 = ${this.field1}"); // n.v.
205

206                 int field2 = new Integer JavaDoc(20).intValue();
207                 TestLog.debug("GlobalPublic.EmbeddedClass.<init>().field2 = "
208                         + field2);
209                 TestLog
210                         .debug("GlobalPublic.EmbeddedClass.<init>().field5 = ${field5}");
211                 TestLog
212                 .debug("GlobalPublic.EmbeddedClass.<init>().field6 = ${field6}");
213                 TestLog
214                 .debug("GlobalPublic.EmbeddedClass.<init>().field7 = ${field7}");
215                 TestLog.debug("GlobalPublic.EmbeddedClass.<init>().field8 = "
216                         + field8);
217                 TestLog
218                         .debug("GlobalPublic.EmbeddedClass.<init>().field9 = ${field9}");
219                 TestLog.debug("GlobalPublic.EmbeddedClass.<init>().field10 = "
220                         + field10);
221                 {
222                     TestLog
223                             .debug("GlobalPublic.EmbeddedClass.<init>().<local>.field1 = ${field1}"); // n.v.
224
TestLog
225                             .debug("GlobalPublic.EmbeddedClass.<init>().<local>.this.field1 = ${this.field1}"); // n.v.
226

227                     int field3 = new Integer JavaDoc(30).intValue();
228                     TestLog
229                             .debug("GlobalPublic.EmbeddedClass.<init>().<local>.field2 = "
230                                     + field2);
231                     TestLog
232                             .debug("GlobalPublic.EmbeddedClass.<init>().<local>.field3 = "
233                                     + field3);
234                     TestLog
235                             .debug("GlobalPublic.EmbeddedClass.<init>().<local>.field5 = ${field5}");
236                     TestLog
237                     .debug("GlobalPublic.EmbeddedClass.<init>().<local>.field6 = ${field6}");
238                     TestLog
239                             .debug("GlobalPublic.EmbeddedClass.<init>().<local>.field8 = "
240                                     + field8);
241                     TestLog
242                             .debug("GlobalPublic.EmbeddedClass.<init>().<local>.field9 = ${field9}");
243                     TestLog
244                             .debug("GlobalPublic.EmbeddedClass.<init>().<local>.field10 = "
245                                     + field10);
246                 }
247             }
248
249             // ------------- field8 noch nicht fertig ------------------
250

251             protected final void nonStaticMethod(int field4) {
252                 TestLog
253                         .debug("GlobalPublic.EmbeddedClass.nonStatic().field1 = ${field1} "); // n.v.
254
TestLog
255                         .debug("GlobalPublic.EmbeddedClass.nonStatic().this.field1 = ${this.field1} "); // n.v.
256

257                 int field2 = new Integer JavaDoc(20).intValue();
258                 TestLog
259                         .debug("GlobalPublic.EmbeddedClass.nonStatic().field2 = "
260                                 + field2);
261                 TestLog
262                         .debug("GlobalPublic.EmbeddedClass.nonStatic().field4 = "
263                                 + field4);
264
265                 TestLog
266                         .debug("GlobalPublic.EmbeddedClass.nonStatic().this.field4 = ${this.field4}"); // n.v.
267
TestLog
268                         .debug("GlobalPublic.EmbeddedClass.nonStatic().field5 = ${field5}");
269                 TestLog
270                 .debug("GlobalPublic.EmbeddedClass.nonStatic().field6 = ${field6}");
271                 TestLog
272                         .debug("GlobalPublic.EmbeddedClass.nonStatic().field8 = "
273                                 + field8);
274                 TestLog
275                         .debug("GlobalPublic.EmbeddedClass.nonStatic().field9 = ${field9}");
276                 TestLog
277                         .debug("GlobalPublic.EmbeddedClass.nonStatic().field10 = "
278                                 + field10);
279
280                 {
281                     TestLog
282                             .debug("GlobalPublic.EmbeddedClass.nonStatic().<local>.field1 = ${field1} "); // n.v.
283
TestLog
284                             .debug("GlobalPublic.EmbeddedClass.nonStatic().<local>.this.field1 = ${this.field1} "); // n.v.
285

286                     int field3 = new Integer JavaDoc(30).intValue();
287                     TestLog
288                             .debug("GlobalPublic.EmbeddedClass.nonStatic().<local>.field2 = "
289                                     + field2);
290                     TestLog
291                             .debug("GlobalPublic.EmbeddedClass.nonStatic().<local>.field3 = "
292                                     + field3);
293                     TestLog
294                             .debug("GlobalPublic.EmbeddedClass.nonStatic().<local>.field4 = "
295                                     + field4);
296                     TestLog
297                             .debug("GlobalPublic.EmbeddedClass.nonStatic().<local>.this.field4 = ${this.field4}");
298                     TestLog
299                     .debug("GlobalPublic.EmbeddedClass.nonStatic().<local>.field5 = ${field5}");
300                     TestLog
301                     .debug("GlobalPublic.EmbeddedClass.nonStatic().<local>.field6 = ${field6}");
302                     TestLog
303                             .debug("GlobalPublic.EmbeddedClass.nonStatic().<local>.field8 = "
304                                     + field8);
305                     TestLog
306                             .debug("GlobalPublic.EmbeddedClass.nonStatic().<local>.field9 = ${field9}");
307                     TestLog
308                             .debug("GlobalPublic.EmbeddedClass.nonStatic().<local>.field10 = "
309                                     + field10);
310                 }
311             }
312         }
313
314         new EmbeddedClass().nonStaticMethod(new Integer JavaDoc(40).intValue());
315
316         InnerStaticClass.staticMethod(new Integer JavaDoc(40).intValue());
317         new InnerStaticClass().nonStaticMethod(new Integer JavaDoc(40).intValue());
318
319         new TestInterface1() {
320             {
321                 TestLog
322                         .debug("GlobalPublic.TestInterface1.<init>().field1 = ${field1} "); // n.v.
323
TestLog
324                         .debug("GlobalPublic.TestInterface1.<init>().this.field1 = ${this.field1} "); // n.v.
325

326                 int field2 = new Integer JavaDoc(20).intValue();
327                 TestLog.debug("GlobalPublic.TestInterface1.<init>().field2 = "
328                         + field2);
329                 TestLog.debug("GlobalPublic.TestInterface1.<init>().field5 = ${field5}");
330                 TestLog.debug("GlobalPublic.TestInterface1.<init>().field6 = ${field6}");
331                 TestLog.debug("GlobalPublic.TestInterface1.<init>().field7 = ${field7}");
332                 TestLog.debug("GlobalPublic.TestInterface1.<init>().field8 = "
333                         + field8);
334                 TestLog
335                         .debug("GlobalPublic.TestInterface1.<init>().field9 = ${field9}");
336                 TestLog.debug("GlobalPublic.TestInterface1.<init>().field10 = "
337                         + field10);
338
339                 {
340                     TestLog
341                             .debug("GlobalPublic.TestInterface1.<init>().<local>.field1 = ${field1}"); // n.v.
342
TestLog
343                             .debug("GlobalPublic.TestInterface1.<init>().<local>.this.field1 = ${this.field1}"); // n.v.
344

345                     int field3 = new Integer JavaDoc(30).intValue();
346                     TestLog
347                             .debug("GlobalPublic.TestInterface1.<init>().<local>.field2 = "
348                                     + field2);
349                     TestLog
350                             .debug("GlobalPublic.TestInterface1.<init>().<local>.field3 = "
351                                     + field3);
352                     TestLog
353                     .debug("GlobalPublic.TestInterface1.<init>().<local>.field5 = ${field5}");
354                     TestLog
355                     .debug("GlobalPublic.TestInterface1.<init>().<local>.field6 = ${field6}");
356                     TestLog
357                             .debug("GlobalPublic.TestInterface1.<init>().<local>.field8 = "
358                                     + field8);
359                     TestLog
360                             .debug("GlobalPublic.TestInterface1.<init>().<local>.field9 = ${field9}");
361                     TestLog
362                             .debug("GlobalPublic.TestInterface1.<init>().<local>.field10 = "
363                                     + field10);
364                 }
365             }
366
367             public void nonStaticMethod(int field4) {
368                 TestLog
369                         .debug("GlobalPublic.TestInterface1.nonStatic().field1 = ${field1} "); // n.v.
370
TestLog
371                         .debug("GlobalPublic.TestInterface1.nonStatic().this.field1 = ${this.field1} "); // n.v.
372

373                 int field2 = new Integer JavaDoc(20).intValue();
374                 TestLog
375                         .debug("GlobalPublic.TestInterface1.nonStatic().field2 = "
376                                 + field2);
377                 TestLog
378                         .debug("GlobalPublic.TestInterface1.nonStatic().field4 = "
379                                 + field4);
380                 TestLog
381                         .debug("GlobalPublic.TestInterface1.nonStatic().this.field4 = ${this.field4}");
382                 TestLog
383                 .debug("GlobalPublic.TestInterface1.nonStatic().field5 = ${field5}");
384                 TestLog
385                 .debug("GlobalPublic.TestInterface1.nonStatic().field6 = ${field6}");
386                 TestLog
387                         .debug("GlobalPublic.TestInterface1.nonStatic().field8 = "
388                                 + field8);
389                 TestLog
390                         .debug("GlobalPublic.TestInterface1.nonStatic().field9 = ${field9}");
391                 TestLog
392                         .debug("GlobalPublic.TestInterface1.nonStatic().field10 = "
393                                 + field10);
394
395                 {
396                     TestLog
397                             .debug("GlobalPublic.TestInterface1.nonStatic().<local>.field1 = ${field1} "); // n.v.
398
TestLog
399                             .debug("GlobalPublic.TestInterface1.nonStatic().<local>.this.field1 = ${this.field1} "); // n.v.
400

401                     int field3 = new Integer JavaDoc(30).intValue();
402                     TestLog
403                             .debug("GlobalPublic.TestInterface1.nonStatic().<local>.field2 = "
404                                     + field2);
405                     TestLog
406                             .debug("GlobalPublic.TestInterface1.nonStatic().<local>.field3 = "
407                                     + field3);
408                     TestLog
409                             .debug("GlobalPublic.TestInterface1.nonStatic().<local>.field4 = "
410                                     + field4);
411                     TestLog
412                             .debug("GlobalPublic.TestInterface1.nonStatic().<local>.this.field4 = ${this.field4}");
413                     TestLog
414                     .debug("GlobalPublic.TestInterface1.nonStatic().<local>.field5 = ${field5}");
415                     TestLog
416                     .debug("GlobalPublic.TestInterface1.nonStatic().<local>.field6 = ${field6}");
417                     TestLog
418                             .debug("GlobalPublic.TestInterface1.nonStatic().<local>.field8 = "
419                                     + field8);
420                     TestLog
421                             .debug("GlobalPublic.TestInterface1.nonStatic().<local>.field9 = ${field9}");
422                     TestLog
423                             .debug("GlobalPublic.TestInterface1.nonStatic().<local>.field10 = "
424                                     + field10);
425                 }
426             }
427         }.nonStaticMethod(new Integer JavaDoc(40).intValue());
428     }
429
430     private static void staticMethod(final int field4) {
431         TestLog.debug("GlobalPublic.static().field1 = ${field1} "); // n.v.
432
TestLog.debug("GlobalPublic.static().this.field1 = ${this.field1}"); // n.v.
433

434         int field2 = new Integer JavaDoc(20).intValue();
435         TestLog.debug("GlobalPublic.static().field2 = " + field2);
436         TestLog.debug("GlobalPublic.static().field4 = " + field4);
437         TestLog.debug("GlobalPublic.static().this.field4 = ${this.field4}"); // n.v.
438
TestLog.debug("GlobalPublic.static().field5 = ${field5}");
439         TestLog.debug("GlobalPublic.static().field6 = ${field6}");
440         TestLog.debug("GlobalPublic.static().field8 = " + field8);
441         TestLog.debug("GlobalPublic.static().field9 = ${field9}");
442         TestLog.debug("GlobalPublic.static().field10 = " + field10);
443
444         {
445             TestLog.debug("GlobalPublic.static().<local>.field1 = ${field1}"); // n.v.
446
TestLog
447                     .debug("GlobalPublic.static().<local>.this.field1 = ${this.field1}"); // n.v.
448

449             int field3 = new Integer JavaDoc(30).intValue();
450             TestLog.debug("GlobalPublic.static().<local>.field2 = " + field2);
451             TestLog.debug("GlobalPublic.static().<local>.field3 = " + field3);
452             TestLog.debug("GlobalPublic.static().<local>.field4 = " + field4);
453             TestLog
454                     .debug("GlobalPublic.static().<local>.this.field4 = ${this.field4}");
455             TestLog.debug("GlobalPublic.static().<local>.field5 = ${field5}");
456             TestLog.debug("GlobalPublic.static().<local>.field6 = ${field6}");
457             TestLog.debug("GlobalPublic.static().<local>.field8 = " + field8);
458             TestLog.debug("GlobalPublic.static().<local>.field9 = ${field9}");
459             TestLog.debug("GlobalPublic.static().<local>.field10 = " + field10);
460         }
461     }
462
463     public void nonStaticMethod(final int field4) {
464         TestLog.debug("GlobalPublic.nonStatic().field1 = " + field1);
465         TestLog.debug("GlobalPublic.nonStatic().this.field1 = " + this.field1);
466
467         int field2 = new Integer JavaDoc(20).intValue();
468         TestLog.debug("GlobalPublic.nonStatic().field2 = " + field2);
469         TestLog.debug("GlobalPublic.nonStatic().field4 = " + field4);
470         TestLog.debug("GlobalPublic.nonStatic().this.field4 = " + this.field4);
471         TestLog.debug("GlobalPublic.nonStatic().field5 = " + field5);
472         TestLog.debug("GlobalPublic.nonStatic().field6 = ${field6}");
473         TestLog.debug("GlobalPublic.nonStatic().field7 = " + field7);
474         TestLog.debug("GlobalPublic.nonStatic().field8 = " + field8);
475         TestLog.debug("GlobalPublic.nonStatic().field9 = " + field9);
476         TestLog.debug("GlobalPublic.nonStatic().field10 = " + field10);
477
478         {
479             TestLog
480                     .debug("GlobalPublic.nonStatic().<local>.field1 = "
481                             + field1);
482             TestLog.debug("GlobalPublic.nonStatic().<local>.this.field1 = "
483                     + this.field1);
484
485             int field3 = new Integer JavaDoc(30).intValue();
486             TestLog
487                     .debug("GlobalPublic.nonStatic().<local>.field2 = "
488                             + field2);
489             TestLog
490                     .debug("GlobalPublic.nonStatic().<local>.field3 = "
491                             + field3);
492             TestLog
493                     .debug("GlobalPublic.nonStatic().<local>.field4 = "
494                             + field4);
495             TestLog.debug("GlobalPublic.nonStatic().<local>.this.field4 = "
496                     + this.field4);
497             TestLog
498             .debug("GlobalPublic.nonStatic().<local>.field5 = "
499                     + field5);
500             TestLog
501             .debug("GlobalPublic.nonStatic().<local>.field6 = ${field6}");
502             TestLog
503             .debug("GlobalPublic.nonStatic().<local>.field7 = " + field7);
504             TestLog
505                     .debug("GlobalPublic.nonStatic().<local>.field8 = "
506                             + field8);
507             TestLog
508                     .debug("GlobalPublic.nonStatic().<local>.field9 = "
509                             + field9);
510             TestLog.debug("GlobalPublic.nonStatic().<local>.field10 = "
511                     + field10);
512         }
513     }
514
515     static class InnerStaticClass {
516
517         static {
518             TestLog
519                     .debug("GlobalPublic.InnerStaticClass.<clinit>().field1 = ${field1} "); // n.v.
520
TestLog
521                     .debug("GlobalPublic.InnerStaticClass.<clinit>().this.field1 = ${this.field1} "); // n.v.
522

523             int field2 = new Integer JavaDoc(20).intValue();
524             TestLog.debug("GlobalPublic.InnerStaticClass.<clinit>().field2 = "
525                     + field2);
526             TestLog.debug("GlobalPublic.InnerStaticClass.<clinit>().field5 = ${field5}");
527             TestLog.debug("GlobalPublic.InnerStaticClass.<clinit>().field6 = ${field6}");
528             TestLog.debug("GlobalPublic.InnerStaticClass.<clinit>().field7 = ${field7}");
529             TestLog.debug("GlobalPublic.InnerStaticClass.<clinit>().field8 = "
530                     + field8);
531             TestLog
532                     .debug("GlobalPublic.InnerStaticClass.<clinit>().field9 = ${field9}");
533             TestLog.debug("GlobalPublic.InnerStaticClass.<clinit>().field10 = "
534                     + field10);
535
536             {
537                 TestLog
538                         .debug("GlobalPublic.InnerStaticClass.<clinit>().<local>.field1 = ${field1} "); // n.v.
539
TestLog
540                         .debug("GlobalPublic.InnerStaticClass.<clinit>().<local>.this.field1 = ${this.field1} "); // n.v.
541

542                 int field3 = new Integer JavaDoc(30).intValue();
543                 TestLog
544                         .debug("GlobalPublic.InnerStaticClass.<clinit>().<local>.field2 = "
545                                 + field2);
546                 TestLog
547                         .debug("GlobalPublic.InnerStaticClass.<clinit>().<local>.field3 = "
548                                 + field3);
549                 TestLog
550                 .debug("GlobalPublic.InnerStaticClass.<clinit>().<local>.field5 = ${field5}"
551                         );
552                 TestLog
553                 .debug("GlobalPublic.InnerStaticClass.<clinit>().<local>.field6 = ${field6}"
554                         );
555                 TestLog
556                         .debug("GlobalPublic.InnerStaticClass.<clinit>().<local>.field8 = "
557                                 + field8);
558                 TestLog
559                         .debug("GlobalPublic.InnerStaticClass.<clinit>().<local>.field9 = ${field9}");
560                 TestLog
561                         .debug("GlobalPublic.InnerStaticClass.<clinit>().<local>.field10 = "
562                                 + field10);
563             }
564         }
565
566         {
567             TestLog
568                     .debug("GlobalPublic.InnerStaticClass.<init>().field1 = ${field1} "); // n.v.
569
TestLog
570                     .debug("GlobalPublic.InnerStaticClass.<init>().this.field1 = ${this.field1} "); // n.v.
571

572             int field2 = new Integer JavaDoc(20).intValue();
573             TestLog.debug("GlobalPublic.InnerStaticClass.<init>().field2 = "
574                     + field2);
575             TestLog.debug("GlobalPublic.InnerStaticClass.<init>().field5 = ${field5}");
576             TestLog.debug("GlobalPublic.InnerStaticClass.<init>().field6 = ${field6}");
577             TestLog.debug("GlobalPublic.InnerStaticClass.<init>().field7 = ${field7}");
578             TestLog.debug("GlobalPublic.InnerStaticClass.<init>().field8 = "
579                     + field8);
580             TestLog
581                     .debug("GlobalPublic.InnerStaticClass.<init>().field9 = ${field9}");
582             TestLog.debug("GlobalPublic.InnerStaticClass.<init>().field10 = "
583                     + field10);
584             {
585                 TestLog
586                         .debug("GlobalPublic.InnerStaticClass.<init>().<local>.field1 = ${field1} "); // n.v.
587
TestLog
588                         .debug("GlobalPublic.InnerStaticClass.<init>().<local>.this.field1 = ${this.field1} "); // n.v.
589

590                 int field3 = new Integer JavaDoc(30).intValue();
591                 TestLog
592                         .debug("GlobalPublic.InnerStaticClass.<init>().<local>.field2 = "
593                                 + field2);
594                 TestLog
595                         .debug("GlobalPublic.InnerStaticClass.<init>().<local>.field3 = "
596                                 + field3);
597                 TestLog
598                 .debug("GlobalPublic.InnerStaticClass.<init>().<local>.field5 = ${field5}");
599                 TestLog
600                 .debug("GlobalPublic.InnerStaticClass.<init>().<local>.field6 = ${field6}");
601                 TestLog
602                         .debug("GlobalPublic.InnerStaticClass.<init>().<local>.field8 = "
603                                 + field8);
604                 TestLog
605                         .debug("GlobalPublic.InnerStaticClass.<init>().<local>.field9 = ${field9}");
606                 TestLog
607                         .debug("GlobalPublic.InnerStaticClass.<init>().<local>.field10 = "
608                                 + field10);
609             }
610         }
611
612         private void nonStaticMethod(int field4) {
613             TestLog
614                     .debug("GlobalPublic.InnerStaticClass.nonStatic().field1 = ${field1} "); // n.v.
615
TestLog
616                     .debug("GlobalPublic.InnerStaticClass.nonStatic().this.field1 = ${this.field1} "); // n.v.
617

618             int field2 = new Integer JavaDoc(20).intValue();
619             TestLog.debug("GlobalPublic.InnerStaticClass.nonStatic().field2 = "
620                     + field2);
621             TestLog.debug("GlobalPublic.InnerStaticClass.nonStatic().field4 = "
622                     + field4);
623             TestLog
624                     .debug("GlobalPublic.InnerStaticClass.nonStatic().this.field4 = ${this.field4}");
625             TestLog.debug("GlobalPublic.InnerStaticClass.nonStatic().field5 = ${field5}");
626             TestLog.debug("GlobalPublic.InnerStaticClass.nonStatic().field6 = ${field6}");
627             TestLog.debug("GlobalPublic.InnerStaticClass.nonStatic().field8 = "
628                     + field8);
629             TestLog
630                     .debug("GlobalPublic.InnerStaticClass.nonStatic().field9 = ${field9}");
631             TestLog
632                     .debug("GlobalPublic.InnerStaticClass.nonStatic().field10 = "
633                             + field10);
634
635             {
636                 TestLog
637                         .debug("GlobalPublic.InnerStaticClass.nonStatic().<local>.field1 = ${field1} "); // n.v.
638
TestLog
639                         .debug("GlobalPublic.InnerStaticClass.nonStatic().<local>.this.field1 = ${this.field1} "); // n.v.
640

641                 int field3 = new Integer JavaDoc(30).intValue();
642                 TestLog
643                         .debug("GlobalPublic.InnerStaticClass.nonStatic().<local>.field2 = "
644                                 + field2);
645                 TestLog
646                         .debug("GlobalPublic.InnerStaticClass.nonStatic().<local>.field3 = "
647                                 + field3);
648                 TestLog
649                         .debug("GlobalPublic.InnerStaticClass.nonStatic().<local>.field4 = "
650                                 + field4);
651                 TestLog
652                         .debug("GlobalPublic.InnerStaticClass.nonStatic().<local>.this.field4 = ${this.field4}");
653                 TestLog
654                 .debug("GlobalPublic.InnerStaticClass.nonStatic().<local>.field5 = ${field5}");
655                 TestLog
656                 .debug("GlobalPublic.InnerStaticClass.nonStatic().<local>.field6 = ${field6}");
657                 TestLog
658                         .debug("GlobalPublic.InnerStaticClass.nonStatic().<local>.field8 = "
659                                 + field8);
660                 TestLog
661                         .debug("GlobalPublic.InnerStaticClass.nonStatic().<local>.field9 = ${field9}");
662                 TestLog
663                         .debug("GlobalPublic.InnerStaticClass.nonStatic().<local>.field10 = "
664                                 + field10);
665             }
666         }
667
668         public static void staticMethod(int field4) {
669             TestLog
670                     .debug("GlobalPublic.InnerStaticClass.static().field1 = ${field1} "); // n.v.
671
TestLog
672                     .debug("GlobalPublic.InnerStaticClass.static().this.field1 = ${this.field1} "); // n.v.
673

674             int field2 = new Integer JavaDoc(20).intValue();
675             TestLog.debug("GlobalPublic.InnerStaticClass.static().field2 = "
676                     + field2);
677             TestLog.debug("GlobalPublic.InnerStaticClass.static().field4 = "
678                     + field4);
679             TestLog
680                     .debug("GlobalPublic.InnerStaticClass.static().this.field4 = ${this.field4}"); // n.v.
681
TestLog.debug("GlobalPublic.InnerStaticClass.static().field5 = ${field5}");
682             TestLog.debug("GlobalPublic.InnerStaticClass.static().field6 = ${field6}");
683             TestLog.debug("GlobalPublic.InnerStaticClass.static().field8 = "
684                     + field8);
685             TestLog
686                     .debug("GlobalPublic.InnerStaticClass.static().field9 = ${field9}");
687             TestLog.debug("GlobalPublic.InnerStaticClass.static().field10 = "
688                     + field10);
689
690             {
691                 TestLog
692                         .debug("GlobalPublic.InnerStaticClass.static().<local>.field1 = ${field1} "); // n.v.
693
TestLog
694                         .debug("GlobalPublic.InnerStaticClass.static().<local>.this.field1 = ${this.field1} "); // n.v.
695

696                 int field3 = new Integer JavaDoc(30).intValue();
697                 TestLog
698                         .debug("GlobalPublic.InnerStaticClass.static().<local>.field2 = "
699                                 + field2);
700                 TestLog
701                         .debug("GlobalPublic.InnerStaticClass.static().<local>.field3 = "
702                                 + field3);
703                 TestLog
704                         .debug("GlobalPublic.InnerStaticClass.static().<local>.field4 = "
705                                 + field4);
706                 TestLog
707                 .debug("GlobalPublic.InnerStaticClass.static().<local>.field5 = ${field5}");
708                 TestLog
709                 .debug("GlobalPublic.InnerStaticClass.static().<local>.field6 = ${field6}");
710                 TestLog
711                         .debug("GlobalPublic.InnerStaticClass.static().<local>.this.field4 = ${this.field4}");
712                 TestLog
713                         .debug("GlobalPublic.InnerStaticClass.static().<local>.field8 = "
714                                 + field8);
715                 TestLog
716                         .debug("GlobalPublic.InnerStaticClass.static().<local>.field9 = ${field9}");
717                 TestLog
718                         .debug("GlobalPublic.InnerStaticClass.static().<local>.field10 = "
719                                 + field10);
720             }
721         }
722     }
723
724     class InnerClass {
725         {
726             TestLog
727                     .debug("GlobalPublic.InnerClass.<init>().field1 = "
728                             + field1);
729             TestLog
730                     .debug("GlobalPublic.InnerClass.<init>().this.field1 = ${this.field1}"); // n.v.
731

732             int field2 = new Integer JavaDoc(20).intValue();
733             TestLog
734                     .debug("GlobalPublic.InnerClass.<init>().field2 = "
735                             + field2);
736             TestLog
737             .debug("GlobalPublic.InnerClass.<init>().field5 = "
738                     + field5);
739             TestLog
740             .debug("GlobalPublic.InnerClass.<init>().field6 = ${field6}");
741             TestLog
742             .debug("GlobalPublic.InnerClass.<init>().field7 = " + field7);
743             TestLog
744                     .debug("GlobalPublic.InnerClass.<init>().field8 = "
745                             + field8);
746             TestLog
747                     .debug("GlobalPublic.InnerClass.<init>().field9 = "
748                             + field9);
749             TestLog.debug("GlobalPublic.InnerClass.<init>().field10 = "
750                     + field10);
751
752             {
753                 TestLog
754                         .debug("GlobalPublic.InnerClass.<init>().<local>.field1 = "
755                                 + field1);
756                 TestLog
757                         .debug("GlobalPublic.InnerClass.<init>().<local>.this.field1 = ${this.field1}"); // n.v.
758

759                 int field3 = new Integer JavaDoc(30).intValue();
760                 TestLog
761                         .debug("GlobalPublic.InnerClass.<init>().<local>.field2 = "
762                                 + field2);
763                 TestLog
764                         .debug("GlobalPublic.InnerClass.<init>().<local>.field3 = "
765                                 + field3);
766                 TestLog
767                 .debug("GlobalPublic.InnerClass.<init>().<local>.field5 = "
768                         + field5);
769                 TestLog
770                 .debug("GlobalPublic.InnerClass.<init>().<local>.field6 = ${field6}");
771                 TestLog
772                         .debug("GlobalPublic.InnerClass.<init>().<local>.field8 = "
773                                 + field8);
774                 TestLog
775                         .debug("GlobalPublic.InnerClass.<init>().<local>.field9 = "
776                                 + field9);
777                 TestLog
778                         .debug("GlobalPublic.InnerClass.<init>().<local>.field10 = "
779                                 + field10);
780             }
781
782         }
783
784         private void nonStaticMethod(int field4) {
785             TestLog.debug("GlobalPublic.InnerClass.nonStatic().field1 = "
786                     + field1);
787             TestLog
788                     .debug("GlobalPublic.InnerClass.nonStatic().this.field1 = ${this.field1}"); // n.v.
789

790             int field2 = new Integer JavaDoc(20).intValue();
791             TestLog.debug("GlobalPublic.InnerClass.nonStatic().field2 = "
792                     + field2);
793             TestLog.debug("GlobalPublic.InnerClass.nonStatic().field4 = "
794                     + field4);
795             TestLog
796                     .debug("GlobalPublic.InnerClass.nonStatic().this.field4 = ${this.field4}");
797             TestLog.debug("GlobalPublic.InnerClass.nonStatic().field5 = "
798                     + field5);
799             TestLog.debug("GlobalPublic.InnerClass.nonStatic().field6 = ${field6}" );
800             TestLog.debug("GlobalPublic.InnerClass.nonStatic().field8 = "
801                     + field8);
802             TestLog.debug("GlobalPublic.InnerClass.nonStatic().field9 = "
803                     + field9);
804             TestLog.debug("GlobalPublic.InnerClass.nonStatic().field10 = "
805                     + field10);
806             {
807                 TestLog
808                         .debug("GlobalPublic.InnerClass.nonStatic().<local>.field1 = "
809                                 + field1);
810                 TestLog
811                         .debug("GlobalPublic.InnerClass.nonStatic().<local>.this.field1 = ${this.field1}"); // n.v.
812

813                 int field3 = new Integer JavaDoc(30).intValue();
814                 TestLog
815                         .debug("GlobalPublic.InnerClass.nonStatic().<local>.field2 = "
816                                 + field2);
817                 TestLog
818                         .debug("GlobalPublic.InnerClass.nonStatic().<local>.field3 = "
819                                 + field3);
820
821                 TestLog
822                         .debug("GlobalPublic.InnerClass.nonStatic().<local>.field4 = "
823                                 + field4);
824                 TestLog
825                         .debug("GlobalPublic.InnerClass.nonStatic().<local>.this.field4 = ${this.field4}");
826                 TestLog
827                 .debug("GlobalPublic.InnerClass.nonStatic().<local>.field5 = "
828                         + field5);
829                 TestLog
830                 .debug("GlobalPublic.InnerClass.nonStatic().<local>.field6 = ${field6}");
831                 TestLog
832                         .debug("GlobalPublic.InnerClass.nonStatic().<local>.field8 = "
833                                 + field8);
834                 TestLog
835                         .debug("GlobalPublic.InnerClass.nonStatic().<local>.field9 = "
836                                 + field9);
837                 TestLog
838                         .debug("GlobalPublic.InnerClass.nonStatic().<local>.field10 = "
839                                 + field10);
840             }
841         }
842     }
843 }
844
Popular Tags