You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

AtAspect.java 554B

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