KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > net > sf > cglib > reflect > TestFastClass


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 package net.sf.cglib.reflect;
17
18 import java.io.*;
19 import java.lang.reflect.Constructor JavaDoc;
20 import java.lang.reflect.InvocationTargetException JavaDoc;
21 import java.lang.reflect.Method JavaDoc;
22 import java.util.*;
23 import junit.framework.*;
24 import net.sf.cglib.core.ClassGenerator;
25 import net.sf.cglib.core.DefaultGeneratorStrategy;
26 import net.sf.cglib.transform.ClassTransformerTee;
27 import net.sf.cglib.transform.NullClassVisitor;
28 import net.sf.cglib.transform.TransformingClassGenerator;
29
30 public class TestFastClass extends net.sf.cglib.CodeGenTestCase {
31     public static class Simple {
32     }
33
34     public static class ThrowsSomething {
35         public void foo() throws IOException {
36             throw new IOException("hello");
37         }
38     }
39     
40     public void testSimple() throws Throwable JavaDoc {
41         FastClass.create(Simple.class).newInstance();
42     }
43
44     public void testException() throws Throwable JavaDoc {
45         FastClass fc = FastClass.create(ThrowsSomething.class);
46         ThrowsSomething ts = new ThrowsSomething();
47         try {
48             fc.invoke("foo", new Class JavaDoc[0], ts, new Object JavaDoc[0]);
49             fail("expected exception");
50         } catch (InvocationTargetException JavaDoc e) {
51             assertTrue(e.getTargetException() instanceof IOException);
52         }
53     }
54
55     public void testTypeMismatch() throws Throwable JavaDoc {
56         FastClass fc = FastClass.create(ThrowsSomething.class);
57         ThrowsSomething ts = new ThrowsSomething();
58         try {
59             fc.invoke("foo", new Class JavaDoc[]{ Integer.TYPE }, ts, new Object JavaDoc[0]);
60             fail("expected exception");
61         } catch (IllegalArgumentException JavaDoc ignore) { }
62     }
63
64     public void testComplex() throws Throwable JavaDoc {
65         FastClass fc = FastClass.create(MemberSwitchBean.class);
66         MemberSwitchBean bean = (MemberSwitchBean)fc.newInstance();
67         assertTrue(bean.init == 0);
68         assertTrue(fc.getName().equals("net.sf.cglib.reflect.MemberSwitchBean"));
69         assertTrue(fc.getJavaClass() == MemberSwitchBean.class);
70         assertTrue(fc.getMaxIndex() == 19);
71
72         Constructor JavaDoc c1 = MemberSwitchBean.class.getConstructor(new Class JavaDoc[0]);
73         FastConstructor fc1 = fc.getConstructor(c1);
74         assertTrue(((MemberSwitchBean)fc1.newInstance()).init == 0);
75         assertTrue(fc1.toString().equals("public net.sf.cglib.reflect.MemberSwitchBean()"));
76
77         Method JavaDoc m1 = MemberSwitchBean.class.getMethod("foo", new Class JavaDoc[]{ Integer.TYPE, String JavaDoc.class });
78         assertTrue(fc.getMethod(m1).invoke(bean, new Object JavaDoc[]{ new Integer JavaDoc(0), "" }).equals(new Integer JavaDoc(6)));
79
80         // TODO: should null be allowed here?
81
Method JavaDoc m2 = MemberSwitchBean.class.getDeclaredMethod("pkg", null);
82         assertTrue(fc.getMethod(m2).invoke(bean, null).equals(new Integer JavaDoc(9)));
83     }
84
85     public void testStatic() throws Throwable JavaDoc {
86         FastClass fc = FastClass.create(MemberSwitchBean.class);
87         // MemberSwitchBean bean = (MemberSwitchBean)fc.newInstance();
88
assertTrue(fc.invoke("staticMethod", new Class JavaDoc[0], null, null).equals(new Integer JavaDoc(10)));
89     }
90
91     private static abstract class ReallyBigClass {
92         public ReallyBigClass() {
93         }
94         abstract public void method1(int i, short s, float f);
95         abstract public void method1(int i, byte d, float f);
96         abstract public void method2(int i, short s, float f);
97         abstract public void method2(int i, byte d, float f);
98         abstract public void method3(int i, short s, float f);
99         abstract public void method3(int i, byte d, float f);
100         abstract public void method4(int i, short s, float f);
101         abstract public void method4(int i, byte d, float f);
102         abstract public void method5(int i, short s, float f);
103         abstract public void method5(int i, byte d, float f);
104         abstract public void method6(int i, short s, float f);
105         abstract public void method6(int i, byte d, float f);
106         abstract public void method7(int i, short s, float f);
107         abstract public void method7(int i, byte d, float f);
108         abstract public void method8(int i, short s, float f);
109         abstract public void method8(int i, byte d, float f);
110         abstract public void method9(int i, short s, float f);
111         abstract public void method9(int i, byte d, float f);
112         abstract public void method10(int i, short s, float f);
113         abstract public void method10(int i, byte d, float f);
114         abstract public void method11(int i, short s, float f);
115         abstract public void method11(int i, byte d, float f);
116         abstract public void method12(int i, short s, float f);
117         abstract public void method12(int i, byte d, float f);
118         abstract public void method13(int i, short s, float f);
119         abstract public void method13(int i, byte d, float f);
120         abstract public void method14(int i, short s, float f);
121         abstract public void method14(int i, byte d, float f);
122         abstract public void method15(int i, short s, float f);
123         abstract public void method15(int i, byte d, float f);
124         abstract public void method16(int i, short s, float f);
125         abstract public void method16(int i, byte d, float f);
126         abstract public void method17(int i, short s, float f);
127         abstract public void method17(int i, byte d, float f);
128         abstract public void method18(int i, short s, float f);
129         abstract public void method18(int i, byte d, float f);
130         abstract public void method19(int i, short s, float f);
131         abstract public void method19(int i, byte d, float f);
132         abstract public void method20(int i, short s, float f);
133         abstract public void method20(int i, byte d, float f);
134         abstract public void method21(int i, short s, float f);
135         abstract public void method21(int i, byte d, float f);
136         abstract public void method22(int i, short s, float f);
137         abstract public void method22(int i, byte d, float f);
138         abstract public void method23(int i, short s, float f);
139         abstract public void method23(int i, byte d, float f);
140         abstract public void method24(int i, short s, float f);
141         abstract public void method24(int i, byte d, float f);
142         abstract public void method25(int i, short s, float f);
143         abstract public void method25(int i, byte d, float f);
144         abstract public void method26(int i, short s, float f);
145         abstract public void method26(int i, byte d, float f);
146         abstract public void method27(int i, short s, float f);
147         abstract public void method27(int i, byte d, float f);
148         abstract public void method28(int i, short s, float f);
149         abstract public void method28(int i, byte d, float f);
150         abstract public void method29(int i, short s, float f);
151         abstract public void method29(int i, byte d, float f);
152         abstract public void method30(int i, short s, float f);
153         abstract public void method30(int i, byte d, float f);
154         abstract public void method31(int i, short s, float f);
155         abstract public void method31(int i, byte d, float f);
156         abstract public void method32(int i, short s, float f);
157         abstract public void method32(int i, byte d, float f);
158         abstract public void method33(int i, short s, float f);
159         abstract public void method33(int i, byte d, float f);
160         abstract public void method34(int i, short s, float f);
161         abstract public void method34(int i, byte d, float f);
162         abstract public void method35(int i, short s, float f);
163         abstract public void method35(int i, byte d, float f);
164         abstract public void method36(int i, short s, float f);
165         abstract public void method36(int i, byte d, float f);
166         abstract public void method37(int i, short s, float f);
167         abstract public void method37(int i, byte d, float f);
168         abstract public void method38(int i, short s, float f);
169         abstract public void method38(int i, byte d, float f);
170         abstract public void method39(int i, short s, float f);
171         abstract public void method39(int i, byte d, float f);
172         abstract public void method40(int i, short s, float f);
173         abstract public void method40(int i, byte d, float f);
174         abstract public void method41(int i, short s, float f);
175         abstract public void method41(int i, byte d, float f);
176         abstract public void method42(int i, short s, float f);
177         abstract public void method42(int i, byte d, float f);
178         abstract public void method43(int i, short s, float f);
179         abstract public void method43(int i, byte d, float f);
180         abstract public void method44(int i, short s, float f);
181         abstract public void method44(int i, byte d, float f);
182         abstract public void method45(int i, short s, float f);
183         abstract public void method45(int i, byte d, float f);
184         abstract public void method46(int i, short s, float f);
185         abstract public void method46(int i, byte d, float f);
186         abstract public void method47(int i, short s, float f);
187         abstract public void method47(int i, byte d, float f);
188         abstract public void method48(int i, short s, float f);
189         abstract public void method48(int i, byte d, float f);
190         abstract public void method49(int i, short s, float f);
191         abstract public void method49(int i, byte d, float f);
192         abstract public void method50(int i, short s, float f);
193         abstract public void method50(int i, byte d, float f);
194         abstract public void method51(int i, short s, float f);
195         abstract public void method51(int i, byte d, float f);
196         abstract public void method52(int i, short s, float f);
197         abstract public void method52(int i, byte d, float f);
198         abstract public void method53(int i, short s, float f);
199         abstract public void method53(int i, byte d, float f);
200         abstract public void method54(int i, short s, float f);
201         abstract public void method54(int i, byte d, float f);
202         abstract public void method55(int i, short s, float f);
203         abstract public void method55(int i, byte d, float f);
204         abstract public void method56(int i, short s, float f);
205         abstract public void method56(int i, byte d, float f);
206         abstract public void method57(int i, short s, float f);
207         abstract public void method57(int i, byte d, float f);
208         abstract public void method58(int i, short s, float f);
209         abstract public void method58(int i, byte d, float f);
210         abstract public void method59(int i, short s, float f);
211         abstract public void method59(int i, byte d, float f);
212         abstract public void method60(int i, short s, float f);
213         abstract public void method60(int i, byte d, float f);
214         abstract public void method61(int i, short s, float f);
215         abstract public void method61(int i, byte d, float f);
216         abstract public void method62(int i, short s, float f);
217         abstract public void method62(int i, byte d, float f);
218         abstract public void method63(int i, short s, float f);
219         abstract public void method63(int i, byte d, float f);
220         abstract public void method64(int i, short s, float f);
221         abstract public void method64(int i, byte d, float f);
222         abstract public void method65(int i, short s, float f);
223         abstract public void method65(int i, byte d, float f);
224         abstract public void method66(int i, short s, float f);
225         abstract public void method66(int i, byte d, float f);
226         abstract public void method67(int i, short s, float f);
227         abstract public void method67(int i, byte d, float f);
228         abstract public void method68(int i, short s, float f);
229         abstract public void method68(int i, byte d, float f);
230         abstract public void method69(int i, short s, float f);
231         abstract public void method69(int i, byte d, float f);
232         abstract public void method70(int i, short s, float f);
233         abstract public void method70(int i, byte d, float f);
234         abstract public void method71(int i, short s, float f);
235         abstract public void method71(int i, byte d, float f);
236         abstract public void method72(int i, short s, float f);
237         abstract public void method72(int i, byte d, float f);
238         abstract public void method73(int i, short s, float f);
239         abstract public void method73(int i, byte d, float f);
240         abstract public void method74(int i, short s, float f);
241         abstract public void method74(int i, byte d, float f);
242         abstract public void method75(int i, short s, float f);
243         abstract public void method75(int i, byte d, float f);
244         abstract public void method76(int i, short s, float f);
245         abstract public void method76(int i, byte d, float f);
246         abstract public void method77(int i, short s, float f);
247         abstract public void method77(int i, byte d, float f);
248         abstract public void method78(int i, short s, float f);
249         abstract public void method78(int i, byte d, float f);
250         abstract public void method79(int i, short s, float f);
251         abstract public void method79(int i, byte d, float f);
252         abstract public void method80(int i, short s, float f);
253         abstract public void method80(int i, byte d, float f);
254         abstract public void method81(int i, short s, float f);
255         abstract public void method81(int i, byte d, float f);
256         abstract public void method82(int i, short s, float f);
257         abstract public void method82(int i, byte d, float f);
258         abstract public void method83(int i, short s, float f);
259         abstract public void method83(int i, byte d, float f);
260         abstract public void method84(int i, short s, float f);
261         abstract public void method84(int i, byte d, float f);
262         abstract public void method85(int i, short s, float f);
263         abstract public void method85(int i, byte d, float f);
264         abstract public void method86(int i, short s, float f);
265         abstract public void method86(int i, byte d, float f);
266         abstract public void method87(int i, short s, float f);
267         abstract public void method87(int i, byte d, float f);
268         abstract public void method88(int i, short s, float f);
269         abstract public void method88(int i, byte d, float f);
270         abstract public void method89(int i, short s, float f);
271         abstract public void method89(int i, byte d, float f);
272         abstract public void method90(int i, short s, float f);
273         abstract public void method90(int i, byte d, float f);
274         abstract public void method91(int i, short s, float f);
275         abstract public void method91(int i, byte d, float f);
276         abstract public void method92(int i, short s, float f);
277         abstract public void method92(int i, byte d, float f);
278         abstract public void method93(int i, short s, float f);
279         abstract public void method93(int i, byte d, float f);
280         abstract public void method94(int i, short s, float f);
281         abstract public void method94(int i, byte d, float f);
282         abstract public void method95(int i, short s, float f);
283         abstract public void method95(int i, byte d, float f);
284         abstract public void method96(int i, short s, float f);
285         abstract public void method96(int i, byte d, float f);
286         abstract public void method97(int i, short s, float f);
287         abstract public void method97(int i, byte d, float f);
288         abstract public void method98(int i, short s, float f);
289         abstract public void method98(int i, byte d, float f);
290         abstract public void method99(int i, short s, float f);
291         abstract public void method99(int i, byte d, float f);
292         abstract public void method100(int i, short s, float f);
293         abstract public void method100(int i, byte d, float f);
294         abstract public void method101(int i, short s, float f);
295         abstract public void method101(int i, byte d, float f);
296         abstract public void method102(int i, short s, float f);
297         abstract public void method102(int i, byte d, float f);
298         abstract public void method103(int i, short s, float f);
299         abstract public void method103(int i, byte d, float f);
300         abstract public void method104(int i, short s, float f);
301         abstract public void method104(int i, byte d, float f);
302         abstract public void method105(int i, short s, float f);
303         abstract public void method105(int i, byte d, float f);
304         abstract public void method106(int i, short s, float f);
305         abstract public void method106(int i, byte d, float f);
306         abstract public void method107(int i, short s, float f);
307         abstract public void method107(int i, byte d, float f);
308         abstract public void method108(int i, short s, float f);
309         abstract public void method108(int i, byte d, float f);
310         abstract public void method109(int i, short s, float f);
311         abstract public void method109(int i, byte d, float f);
312         abstract public void method110(int i, short s, float f);
313         abstract public void method110(int i, byte d, float f);
314         abstract public void method111(int i, short s, float f);
315         abstract public void method111(int i, byte d, float f);
316         abstract public void method112(int i, short s, float f);
317         abstract public void method112(int i, byte d, float f);
318         abstract public void method113(int i, short s, float f);
319         abstract public void method113(int i, byte d, float f);
320         abstract public void method114(int i, short s, float f);
321         abstract public void method114(int i, byte d, float f);
322         abstract public void method115(int i, short s, float f);
323         abstract public void method115(int i, byte d, float f);
324         abstract public void method116(int i, short s, float f);
325         abstract public void method116(int i, byte d, float f);
326         abstract public void method117(int i, short s, float f);
327         abstract public void method117(int i, byte d, float f);
328         abstract public void method118(int i, short s, float f);
329         abstract public void method118(int i, byte d, float f);
330         abstract public void method119(int i, short s, float f);
331         abstract public void method119(int i, byte d, float f);
332         abstract public void method120(int i, short s, float f);
333         abstract public void method120(int i, byte d, float f);
334
335
336         abstract public void methodB1(int i, short s, float f);
337         abstract public void methodB1(int i, byte d, float f);
338         abstract public void methodB2(int i, short s, float f);
339         abstract public void methodB2(int i, byte d, float f);
340         abstract public void methodB3(int i, short s, float f);
341         abstract public void methodB3(int i, byte d, float f);
342         abstract public void methodB4(int i, short s, float f);
343         abstract public void methodB4(int i, byte d, float f);
344         abstract public void methodB5(int i, short s, float f);
345         abstract public void methodB5(int i, byte d, float f);
346         abstract public void methodB6(int i, short s, float f);
347         abstract public void methodB6(int i, byte d, float f);
348         abstract public void methodB7(int i, short s, float f);
349         abstract public void methodB7(int i, byte d, float f);
350         abstract public void methodB8(int i, short s, float f);
351         abstract public void methodB8(int i, byte d, float f);
352         abstract public void methodB9(int i, short s, float f);
353         abstract public void methodB9(int i, byte d, float f);
354         abstract public void methodB10(int i, short s, float f);
355         abstract public void methodB10(int i, byte d, float f);
356         abstract public void methodB11(int i, short s, float f);
357         abstract public void methodB11(int i, byte d, float f);
358         abstract public void methodB12(int i, short s, float f);
359         abstract public void methodB12(int i, byte d, float f);
360         abstract public void methodB13(int i, short s, float f);
361         abstract public void methodB13(int i, byte d, float f);
362         abstract public void methodB14(int i, short s, float f);
363         abstract public void methodB14(int i, byte d, float f);
364         abstract public void methodB15(int i, short s, float f);
365         abstract public void methodB15(int i, byte d, float f);
366         abstract public void methodB16(int i, short s, float f);
367         abstract public void methodB16(int i, byte d, float f);
368         abstract public void methodB17(int i, short s, float f);
369         abstract public void methodB17(int i, byte d, float f);
370         abstract public void methodB18(int i, short s, float f);
371         abstract public void methodB18(int i, byte d, float f);
372         abstract public void methodB19(int i, short s, float f);
373         abstract public void methodB19(int i, byte d, float f);
374         abstract public void methodB20(int i, short s, float f);
375         abstract public void methodB20(int i, byte d, float f);
376         abstract public void methodB21(int i, short s, float f);
377         abstract public void methodB21(int i, byte d, float f);
378         abstract public void methodB22(int i, short s, float f);
379         abstract public void methodB22(int i, byte d, float f);
380         abstract public void methodB23(int i, short s, float f);
381         abstract public void methodB23(int i, byte d, float f);
382         abstract public void methodB24(int i, short s, float f);
383         abstract public void methodB24(int i, byte d, float f);
384         abstract public void methodB25(int i, short s, float f);
385         abstract public void methodB25(int i, byte d, float f);
386         abstract public void methodB26(int i, short s, float f);
387         abstract public void methodB26(int i, byte d, float f);
388         abstract public void methodB27(int i, short s, float f);
389         abstract public void methodB27(int i, byte d, float f);
390         abstract public void methodB28(int i, short s, float f);
391         abstract public void methodB28(int i, byte d, float f);
392         abstract public void methodB29(int i, short s, float f);
393         abstract public void methodB29(int i, byte d, float f);
394         abstract public void methodB30(int i, short s, float f);
395         abstract public void methodB30(int i, byte d, float f);
396         abstract public void methodB31(int i, short s, float f);
397         abstract public void methodB31(int i, byte d, float f);
398         abstract public void methodB32(int i, short s, float f);
399         abstract public void methodB32(int i, byte d, float f);
400         abstract public void methodB33(int i, short s, float f);
401         abstract public void methodB33(int i, byte d, float f);
402         abstract public void methodB34(int i, short s, float f);
403         abstract public void methodB34(int i, byte d, float f);
404         abstract public void methodB35(int i, short s, float f);
405         abstract public void methodB35(int i, byte d, float f);
406         abstract public void methodB36(int i, short s, float f);
407         abstract public void methodB36(int i, byte d, float f);
408         abstract public void methodB37(int i, short s, float f);
409         abstract public void methodB37(int i, byte d, float f);
410         abstract public void methodB38(int i, short s, float f);
411         abstract public void methodB38(int i, byte d, float f);
412         abstract public void methodB39(int i, short s, float f);
413         abstract public void methodB39(int i, byte d, float f);
414         abstract public void methodB40(int i, short s, float f);
415         abstract public void methodB40(int i, byte d, float f);
416         abstract public void methodB41(int i, short s, float f);
417         abstract public void methodB41(int i, byte d, float f);
418         abstract public void methodB42(int i, short s, float f);
419         abstract public void methodB42(int i, byte d, float f);
420         abstract public void methodB43(int i, short s, float f);
421         abstract public void methodB43(int i, byte d, float f);
422         abstract public void methodB44(int i, short s, float f);
423         abstract public void methodB44(int i, byte d, float f);
424         abstract public void methodB45(int i, short s, float f);
425         abstract public void methodB45(int i, byte d, float f);
426         abstract public void methodB46(int i, short s, float f);
427         abstract public void methodB46(int i, byte d, float f);
428         abstract public void methodB47(int i, short s, float f);
429         abstract public void methodB47(int i, byte d, float f);
430         abstract public void methodB48(int i, short s, float f);
431         abstract public void methodB48(int i, byte d, float f);
432         abstract public void methodB49(int i, short s, float f);
433         abstract public void methodB49(int i, byte d, float f);
434         abstract public void methodB50(int i, short s, float f);
435         abstract public void methodB50(int i, byte d, float f);
436         abstract public void methodB51(int i, short s, float f);
437         abstract public void methodB51(int i, byte d, float f);
438         abstract public void methodB52(int i, short s, float f);
439         abstract public void methodB52(int i, byte d, float f);
440         abstract public void methodB53(int i, short s, float f);
441         abstract public void methodB53(int i, byte d, float f);
442         abstract public void methodB54(int i, short s, float f);
443         abstract public void methodB54(int i, byte d, float f);
444         abstract public void methodB55(int i, short s, float f);
445         abstract public void methodB55(int i, byte d, float f);
446         abstract public void methodB56(int i, short s, float f);
447         abstract public void methodB56(int i, byte d, float f);
448         abstract public void methodB57(int i, short s, float f);
449         abstract public void methodB57(int i, byte d, float f);
450         abstract public void methodB58(int i, short s, float f);
451         abstract public void methodB58(int i, byte d, float f);
452         abstract public void methodB59(int i, short s, float f);
453         abstract public void methodB59(int i, byte d, float f);
454         abstract public void methodB60(int i, short s, float f);
455         abstract public void methodB60(int i, byte d, float f);
456         abstract public void methodB61(int i, short s, float f);
457         abstract public void methodB61(int i, byte d, float f);
458         abstract public void methodB62(int i, short s, float f);
459         abstract public void methodB62(int i, byte d, float f);
460         abstract public void methodB63(int i, short s, float f);
461         abstract public void methodB63(int i, byte d, float f);
462         abstract public void methodB64(int i, short s, float f);
463         abstract public void methodB64(int i, byte d, float f);
464         abstract public void methodB65(int i, short s, float f);
465         abstract public void methodB65(int i, byte d, float f);
466         abstract public void methodB66(int i, short s, float f);
467         abstract public void methodB66(int i, byte d, float f);
468         abstract public void methodB67(int i, short s, float f);
469         abstract public void methodB67(int i, byte d, float f);
470         abstract public void methodB68(int i, short s, float f);
471         abstract public void methodB68(int i, byte d, float f);
472         abstract public void methodB69(int i, short s, float f);
473         abstract public void methodB69(int i, byte d, float f);
474         abstract public void methodB70(int i, short s, float f);
475         abstract public void methodB70(int i, byte d, float f);
476         abstract public void methodB71(int i, short s, float f);
477         abstract public void methodB71(int i, byte d, float f);
478         abstract public void methodB72(int i, short s, float f);
479         abstract public void methodB72(int i, byte d, float f);
480         abstract public void methodB73(int i, short s, float f);
481         abstract public void methodB73(int i, byte d, float f);
482         abstract public void methodB74(int i, short s, float f);
483         abstract public void methodB74(int i, byte d, float f);
484         abstract public void methodB75(int i, short s, float f);
485         abstract public void methodB75(int i, byte d, float f);
486         abstract public void methodB76(int i, short s, float f);
487         abstract public void methodB76(int i, byte d, float f);
488         abstract public void methodB77(int i, short s, float f);
489         abstract public void methodB77(int i, byte d, float f);
490         abstract public void methodB78(int i, short s, float f);
491         abstract public void methodB78(int i, byte d, float f);
492         abstract public void methodB79(int i, short s, float f);
493         abstract public void methodB79(int i, byte d, float f);
494         abstract public void methodB80(int i, short s, float f);
495         abstract public void methodB80(int i, byte d, float f);
496         abstract public void methodB81(int i, short s, float f);
497         abstract public void methodB81(int i, byte d, float f);
498         abstract public void methodB82(int i, short s, float f);
499         abstract public void methodB82(int i, byte d, float f);
500         abstract public void methodB83(int i, short s, float f);
501         abstract public void methodB83(int i, byte d, float f);
502         abstract public void methodB84(int i, short s, float f);
503         abstract public void methodB84(int i, byte d, float f);
504         abstract public void methodB85(int i, short s, float f);
505         abstract public void methodB85(int i, byte d, float f);
506         abstract public void methodB86(int i, short s, float f);
507         abstract public void methodB86(int i, byte d, float f);
508         abstract public void methodB87(int i, short s, float f);
509         abstract public void methodB87(int i, byte d, float f);
510         abstract public void methodB88(int i, short s, float f);
511         abstract public void methodB88(int i, byte d, float f);
512         abstract public void methodB89(int i, short s, float f);
513         abstract public void methodB89(int i, byte d, float f);
514         abstract public void methodB90(int i, short s, float f);
515         abstract public void methodB90(int i, byte d, float f);
516         abstract public void methodB91(int i, short s, float f);
517         abstract public void methodB91(int i, byte d, float f);
518         abstract public void methodB92(int i, short s, float f);
519         abstract public void methodB92(int i, byte d, float f);
520         abstract public void methodB93(int i, short s, float f);
521         abstract public void methodB93(int i, byte d, float f);
522         abstract public void methodB94(int i, short s, float f);
523         abstract public void methodB94(int i, byte d, float f);
524         abstract public void methodB95(int i, short s, float f);
525         abstract public void methodB95(int i, byte d, float f);
526         abstract public void methodB96(int i, short s, float f);
527         abstract public void methodB96(int i, byte d, float f);
528         abstract public void methodB97(int i, short s, float f);
529         abstract public void methodB97(int i, byte d, float f);
530         abstract public void methodB98(int i, short s, float f);
531         abstract public void methodB98(int i, byte d, float f);
532         abstract public void methodB99(int i, short s, float f);
533         abstract public void methodB99(int i, byte d, float f);
534         abstract public void methodB100(int i, short s, float f);
535         abstract public void methodB100(int i, byte d, float f);
536         abstract public void methodB101(int i, short s, float f);
537         abstract public void methodB101(int i, byte d, float f);
538         abstract public void methodB102(int i, short s, float f);
539         abstract public void methodB102(int i, byte d, float f);
540         abstract public void methodB103(int i, short s, float f);
541         abstract public void methodB103(int i, byte d, float f);
542         abstract public void methodB104(int i, short s, float f);
543         abstract public void methodB104(int i, byte d, float f);
544         abstract public void methodB105(int i, short s, float f);
545         abstract public void methodB105(int i, byte d, float f);
546         abstract public void methodB106(int i, short s, float f);
547         abstract public void methodB106(int i, byte d, float f);
548         abstract public void methodB107(int i, short s, float f);
549         abstract public void methodB107(int i, byte d, float f);
550         abstract public void methodB108(int i, short s, float f);
551         abstract public void methodB108(int i, byte d, float f);
552         abstract public void methodB109(int i, short s, float f);
553         abstract public void methodB109(int i, byte d, float f);
554         abstract public void methodB110(int i, short s, float f);
555         abstract public void methodB110(int i, byte d, float f);
556         abstract public void methodB111(int i, short s, float f);
557         abstract public void methodB111(int i, byte d, float f);
558         abstract public void methodB112(int i, short s, float f);
559         abstract public void methodB112(int i, byte d, float f);
560         abstract public void methodB113(int i, short s, float f);
561         abstract public void methodB113(int i, byte d, float f);
562         abstract public void methodB114(int i, short s, float f);
563         abstract public void methodB114(int i, byte d, float f);
564         abstract public void methodB115(int i, short s, float f);
565         abstract public void methodB115(int i, byte d, float f);
566         abstract public void methodB116(int i, short s, float f);
567         abstract public void methodB116(int i, byte d, float f);
568         abstract public void methodB117(int i, short s, float f);
569         abstract public void methodB117(int i, byte d, float f);
570         abstract public void methodB118(int i, short s, float f);
571         abstract public void methodB118(int i, byte d, float f);
572         abstract public void methodB119(int i, short s, float f);
573         abstract public void methodB119(int i, byte d, float f);
574         abstract public void methodB120(int i, short s, float f);
575         abstract public void methodB120(int i, byte d, float f);
576     }
577     
578     public void testReallyBigClass() throws IOException {
579         FastClass.Generator gen = new FastClass.Generator();
580         gen.setType(ReallyBigClass.class);
581         FastClass fc = gen.create();
582     }
583
584     public TestFastClass(String JavaDoc testName) {
585         super(testName);
586     }
587     
588     public static void main(String JavaDoc[] args) {
589         junit.textui.TestRunner.run(suite());
590     }
591     
592     public static Test suite() {
593         return new TestSuite(TestFastClass.class);
594     }
595     
596     public void perform(ClassLoader JavaDoc loader) throws Throwable JavaDoc {
597         FastClass.create(loader,Simple.class).newInstance();
598     }
599     
600     public void testFailOnMemoryLeak() throws Throwable JavaDoc {
601         if(leaks()){
602           fail("Memory Leak in FastClass");
603         }
604     }
605     
606 }
607
Popular Tags