codegen: handle exceptions of a method
[mate.git] / tests / Interface3.java
1 package tests;
2
3 public class Interface3 extends Interface2 implements Inf3_I1_local {
4         public int func2(int a, int b) {
5                 return (2 * a) + (2 * b);
6         }
7
8         public int func4() {
9                 return 0x122;
10         }
11
12         public static void main(String []args) {
13                 Interface3 o2 = new Interface3();
14                 Interface2 o1 = o2;
15                 Inf2_I1_local i1 = o1;
16                 Inf2_I2_local i2 = o1;
17                 Inf2_I3_local i3 = o1;
18                 Inf3_I1_local i4 = o2;
19                 System.out.printf("this.x: 0x%08x\n", i1.func1(0x1122));
20                 System.out.printf("this.x: 0x%08x\n", i2.func1(0x22));
21                 System.out.printf("this.x: 0x%08x\n", i3.func1(0x33));
22
23                 System.out.printf("func2: 0x%08x\n", i2.func2(0x22, 0x44));
24                 System.out.printf("func2: 0x%08x\n", i3.func2(0x22, 0x44));
25
26                 System.out.printf("func3: 0x%08x\n", i3.func3(0x111, 0x11));
27
28                 System.out.printf("func4: 0x%08x\n", i4.func4());
29
30                 System.out.printf("o2: 0x%08x\n", o2.func1(0x444));
31                 System.out.printf("o2: 0x%08x\n", o2.func2(0x845, 0x111));
32                 System.out.printf("o2: 0x%08x\n", o2.func3(0x654, 0x153));
33                 System.out.printf("o2: 0x%08x\n", o2.func4());
34         }
35 }
36
37 interface Inf3_I1_local {
38         int func4();
39 }