Menu

[r331]: / trunk / php-java-bridge / tests.php5 / Callback.java  Maximize  Restore  History

Download this file

26 lines (23 with data), 497 Bytes

 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
public interface Callback {
public void c1(String s1, Object o1) throws Exception;
public boolean c2(boolean b);
public long c3(Exception e);
public long ni(Exception e);
public class Test {
public Callback cb;
public Test(Callback closure) {
cb=closure;
}
public long test1() {
try {
cb.c1(new String("TEST"), this);
return 1;
} catch (Exception e) {
return cb.c3(e);
}
}
public boolean test() {
return cb.c2(test1()==2);
}
}
}