summaryrefslogtreecommitdiff
path: root/src/test/java/demobug/Mix.oj
blob: 54a92a385abae6f1e6068886ddf507101e5585dd (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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
package demobug;

import java.awt.*;
import examples.capsule.Point;
import examples.capsule.Test;
import examples.multimethod.MultimethodClass;

public class Mix instantiates MultimethodClass extends Point {

    Point test;

    private Mix() {
        super("Mix's", 0, 0);
        this.test = new Point("Mix's", 0, 0);
    }

    public String toString() {
        System.out.println(test.name.toString());
        System.out.println("(" + test.x + "," + test.y + ")");
        return super.toString();
    }

    public multiform String bar(Panel a, Button b) {
        return "panel";
    }

    public multiform String bar(Button a, Button b) {
        return "button";
    }

    public multiform String bar(Canvas a, Panel b) {
        return "canvas";
    }

    public static void main(String[] argv) {
        Point p = new Mix();
    }

    public multiform void bar(Panel a, Window b) {
        System.out.println("panel");
        String s = ((String) Test.NAME).toString();
        String sa = Test.NAME + "_ALPHA";
        String ss = (Test.NAME).toString();
        return;
    }

}