aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bugs154/pr174449/Foo.java
blob: 68a400d7d8c9db1ab046042020883533275b7911 (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
abstract aspect Replicate<T> {

  protected pointcut broadcast(T servant);

  void around(T servant): broadcast(servant) {
    System.err.println("around advice executing: servant class is "+servant.getClass());
    proceed(servant);
  }

}

aspect ReplicateConcreteB extends Replicate<Boo> {
  protected pointcut broadcast(Boo servant) : call(* *.setScene(..)) && target(servant);
}

aspect ReplicateConcreteG extends Replicate<Goo> {
  protected pointcut broadcast(Goo servant) : call(* *.setScene(..)) && target(servant);
}

public class Foo {
  public static void main(String []argv) {
    new Boo().setScene();
    new Goo().setScene();
  }
}

class Boo {
  public void setScene() {}
}

class Goo {
  public void setScene() {}
}