aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bugs153/pr162135/Foo.java
blob: df4211a4b180c0cd3a233081bda0a6bbaad963cc (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
import java.lang.reflect.Field;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut;

@Aspect public class Foo {

  public void m() {
    new RuntimeException("hello");
  }
	
  public static void main(String[] argv) {
  }
		
  @Pointcut("call(Throwable+.new(String, ..)) && this(caller) && if()")
  public static boolean exceptionInitializer(Object caller) {
      return true;
  }

  @Around("exceptionInitializer(caller)")
  public Object annotateException(ProceedingJoinPoint jp, Object caller) {
      return null;
  }
}