aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bugs154/pr211674/Test2.java
blob: 791eabfa376fb25f9d1721cf4fb6ef4429e4d533 (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
import java.lang.annotation.*;
import org.aspectj.lang.annotation.*;
import org.aspectj.lang.*;

@Aspect class A {

  @Pointcut("execution(@Tracing * *(..)) && @annotation(tracing)")
        void annotatedMethods(Tracing tracing) { }
       
        @AfterThrowing(pointcut = "annotatedMethods(tracing)", throwing = "t")
        public void logException(JoinPoint thisJoinPoint, Throwable t,Tracing tracing) {
        }

}

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

public class Test2 {

  @Tracing
  public void m() {}

  public static void main(String []argv) {}

}