summaryrefslogtreecommitdiffstats
path: root/tests/bugs152/pr135865/A.java
blob: 2f75db8a9fa006574457f12ac18fcec6d2c8a601 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import java.lang.annotation.*;

@Retention(RetentionPolicy.RUNTIME) @interface Ann {}


aspect Aspect {

  before() : call(@Ann * *(..)) { 
    System.out.println("\tJoin point: " + thisJoinPointStaticPart);
  }

  // Methods with out the Ann annotation but in an Ann annotated type get Ann
  declare @method: !@Ann * (@Ann *).*(..) : @Ann;
}

public class A {
  void foo() { new B().foo(); }
  public static void main(String[] args) { new A().foo(); }
}