blob: 0c988c8d234c0f7181a486775a66ff422de57a77 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
package test.ataspectj.pointcutlibrary;
import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
@Aspect
public class AtAspect {
// @Pointcut("execution(public void main(String[]))")
// public void mainMethod () {
// }
@Before("(PointcutLibrary.mainMethod())")
public void beforeMainMethod (JoinPoint.StaticPart thisJoinPointStaticPart, JoinPoint thisJoinPoint) {
System.out.println("AtAspect.beforeMainMethod() " + thisJoinPoint);
}
}
|