01: /*
02: * InnerTest.java --
03: *
04: * This class is used to regression test inner class access using
05: * the java package.
06: *
07: * Copyright (c) 2006 by Moses DeJong
08: *
09: * See the file "license.terms" for information on usage and redistribution
10: * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
11: *
12: * RCS: @(#) $Id: InnerTest.java,v 1.1 2006/04/13 07:36:51 mdejong Exp $
13: *
14: */
15:
16: package tests;
17:
18: import java.util.*;
19:
20: public class InnerTest {
21:
22: // constructor
23:
24: public InnerTest() {
25: }
26:
27: // static class member
28: // FIXME: class member should be accessble
29: // from static inner classes? Test this.
30:
31: public final static int ten = 10;
32:
33: // static inner interface member
34:
35: public static interface InnerInterface1 {
36: }
37:
38: // static inner class members
39:
40: public static class InnerClass1 {
41: public InnerClass1() {
42: }
43: }
44:
45: public static class InnerClass2 implements InnerInterface1 {
46: public InnerClass2() {
47: }
48: }
49:
50: // inner class has same fully qualfied name as toplevel class.
51:
52: public static class DupName {
53: public DupName() {
54: }
55: }
56:
57: // Inner class inside static inner class
58:
59: public static class InnerClass3 {
60: public InnerClass3() {
61: }
62:
63: public static class InnerClass4 {
64: public InnerClass4() {
65: }
66: }
67: }
68:
69: public static InnerClass3.InnerClass4 getInnerClass4() {
70: return new tests.InnerTest.InnerClass3.InnerClass4();
71: }
72:
73: }
|