aboutsummaryrefslogtreecommitdiff
path: root/src/test/test1/ExprEdit7.java
blob: 03be6d86be3a071c6df07387fa0a825f0060ddbd (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
27
28
29
30
package test1;

public class ExprEdit7 {
    int value;
    Class c1, c2;

    public ExprEdit7() { value = 0; }

    public boolean k2(Object obj) {
        return obj instanceof ExprEdit7;
    }

    public ExprEdit7 k3(Object obj) {
        return (ExprEdit7)obj;
    }

    public int k1() {
        ExprEdit7 e = new ExprEdit7();
        if (k2(e))
            k3(e).value = 3;
        else
            k3(e).value = 7;

        System.out.println("ExprEdit7: " + c1.getName());
        if (c1 == c2 && c1.getName().equals("test1.ExprEdit7"))
            return e.value;
        else
            return e.value - 1;
    }
}