|
1234567891011121314151617181920212223242526272829303132 |
- import org.aspectj.lang.annotation.Aspect;
- import org.aspectj.lang.annotation.Before;
- import org.aspectj.lang.JoinPoint;
-
- /**
- * https://github.com/eclipse/org.aspectj/issues/162
- */
- public interface InterfaceWithInnerClass {
- public class ImplicitlyStatic {
- public int getNumber() {
- return 11;
- }
-
- public static void main(String[] args) {
- System.out.println(new ImplicitlyStatic().getNumber());
- }
- }
-
- /*static*/ aspect MyAspect {
- before() : execution(* main(..)) {
- System.out.println(thisJoinPoint);
- }
- }
-
- @Aspect
- /*static*/ class MyAnnotationAspect {
- @Before("execution(* getNumber(..))")
- public void myAdvice(JoinPoint thisJoinPoint){
- System.out.println(thisJoinPoint);
- }
- }
- }
|