blob: 1f2f37cd9b3d6bf38258026b18e972bb69b5943e (
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
|
//Bugzilla Bug 36046
// inter-type declaration bug with abstract classes
public class Driver {
public static void main(String args[]) {
Derived generator = new Derived();
System.out.println(generator.getExecutions("processEvents"));
}
static aspect MonitorBase {
declare parents: Base implements ExecutionMonitor.MonitoredItem;
}
}
class Derived extends Base {
public String getName() {
return null;
}
}
abstract class Base {
abstract public String getName();
}
aspect ExecutionMonitor {
/** marker interface to indicate the execution monitor should track calls
and executions on this class. */
public interface MonitoredItem {
int getExecutions(String methodName);
}
/** a Map of events to mutable integers */
public int MonitoredItem.getExecutions(String methodName) {
return 0;
}
}
|