aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bugs150/PR94167.java
blob: b71f3dd592940cd58cb974fa8fbbc6be41ae9e35 (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
package reflect;

import org.aspectj.lang.*;
import org.aspectj.lang.reflect.*;
import java.lang.reflect.*;

aspect Test {
    before() : call(* *(..)) && !within(Test) {
       MethodSignature sig = (MethodSignature)thisJoinPoint.getSignature();
       //sig.getDeclaringType(); // uncomment to work-around
       Method method = sig.getMethod();
   }
}

public class PR94167 {
    public static void main(String args[]) {
	try {
	    Inner.foo();
	} catch (Throwable t) {
	    t.printStackTrace();
	}
    }
    public static class Inner {
	public static void foo() {}
    }
}