blob: 6aefd137eb0e94cb8e364b0be07aa1e151dbbd6b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
// this bridge stuff is handled by the compiler - because D is a subtype of C even though method1 is being overridden,
// a bridge method 'C method1() { method1();}' is generated in the subclass D
import java.lang.reflect.*;
class C {
C method1() {return null;}
}
class D extends C {
D method1() {return null;}
}
public aspect Bridging1 {
public static void main(String []argv) {
Util.dumpMethods("D",new String[]{"C D.method1() [BridgeMethod]","D D.method1()"});
}
}
|