KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > ResolveConflicts


1 /* Conflicts Copyright (C) 1999 Jochen Hoenicke.
2  *
3  * This program is free software; you can redistribute it and/or modify
4  * it under the terms of the GNU General Public License as published by
5  * the Free Software Foundation; either version 2, or (at your option)
6  * any later version.
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program; see the file COPYING. If not, write to
15  * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
16  *
17  * $Id: ResolveConflicts.java,v 1.2 2000/01/30 16:49:58 jochen Exp $
18  */

19
20 /**
21  * This class tests name conflicts and their resolvation. Note that every
22  * name in this file should be the shortest possible name.
23  */

24 public class ResolveConflicts
25 {
26     public class Conflicts
27     {
28     int Conflicts;
29     
30     class Blah
31     {
32         Conflicts Inner;
33         
34         void Conflicts() {
35 ///#ifndef JAVAC11
36
///#ifndef JAVAC12
37
Inner = ResolveConflicts.Conflicts.this;
38 ///#endif
39
///#endif
40
}
41     }
42     
43     class Inner
44     {
45         int Conflicts;
46         Conflicts Inner;
47         
48         class Blah
49         extends Conflicts.Blah
50         {
51         int Blah;
52         
53         void Inner() {
54             this.Inner.Inner();
55             this.Conflicts();
56 ///#ifndef JAVAC11
57
///#ifndef JAVAC12
58
ResolveConflicts.Conflicts.Inner.this.Inner.Inner();
59             ResolveConflicts.Conflicts.Inner.this.Conflicts();
60 ///#endif
61
///#endif
62
}
63         
64         Blah() {
65             /* empty */
66         }
67         
68         Blah(Conflicts Conflicts) {
69             Conflicts.super();
70         }
71         }
72         
73         void Conflicts() {
74         int Conflicts = 4;
75         Conflicts();
76         new Object JavaDoc() {
77             void Inner() {
78 ///#ifndef JAVAC11
79
///#ifndef JAVAC12
80
ResolveConflicts.Conflicts.this.Inner();
81 ///#endif
82
///#endif
83
}
84         };
85         this.Conflicts = Conflicts;
86         Inner();
87 ///#ifndef JAVAC11
88
///#ifndef JAVAC12
89
ResolveConflicts.Conflicts.this.Conflicts = this.Conflicts;
90 ///#endif
91
///#endif
92
}
93         
94         Conflicts Conflicts(Inner Conflicts) {
95 ///#ifndef JAVAC11
96
///#ifndef JAVAC12
97
ResolveConflicts.Conflicts Inner
98             = ResolveConflicts.Conflicts.this;
99 ///#endif
100
///#endif
101
return ResolveConflicts.this.new Conflicts();
102         }
103     }
104     
105     class Second
106         extends Conflicts.Inner.Blah
107     {
108         Inner Blah = new Inner();
109         
110         class Inner extends Conflicts.Inner
111         {
112         }
113         
114         Conflicts.Inner create() {
115 ///#ifndef JAVAC11
116
///#ifndef JAVAC12
117
ResolveConflicts.Conflicts.Inner inner
118             = ResolveConflicts.Conflicts.this.new Inner();
119 ///#endif
120
///#endif
121
///#ifdef JAVAC11
122
return null;
123 ///#else
124
return ResolveConflicts.this.new Conflicts().new Inner();
125 ///#endif
126
}
127         
128         Second(Conflicts.Inner Blah) {
129         Blah.super();
130         }
131     }
132     
133     public void Inner() {
134         /* empty */
135     }
136     
137     public Conflicts() {
138         int Conflicts = this.Conflicts;
139         Inner Inner = new Inner();
140         Inner.Conflicts = 5;
141         new Inner().Conflicts(Inner).Inner();
142     }
143     }
144 }
145
Popular Tags