summaryrefslogtreecommitdiffstats
path: root/src/test/test4/GetAllRefInnerTest.java
blob: 352b32521a5f51f0024ef6b93ce1b9fc15a39afe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
package test4;

class GetAllRefInnerTest2<T> {
    Class clazz;
    T value;
    void foo(T t) { value = t; }
    Object poi(T t) {
        return new Object() {
            public String toString(T t) { return this.getClass().toString(); }
        };
    }
}

public class GetAllRefInnerTest<T> {
    public T bar(T b) {
        Object obj = new GetAllRefInnerTest2<java.util.HashMap>() {
            void foo(java.util.HashMap a) { value = null; String s = clazz.toString() + a.toString(); }
        };
        return b;
    }
    public Object foo() {
        return new java.util.HashSet<String>() {
            public String toString() { return this.getClass().toString(); } 
        };
    }
}