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.

MyAspect.java 392B

12345678910111213141516171819
  1. package mypackage;
  2. public aspect MyAspect {
  3. pointcut executeMethod(): within(TestClass) && execution(* *(..));
  4. before(): executeMethod() {
  5. System.out.println("Enter "+thisJoinPointStaticPart);
  6. }
  7. after(): executeMethod() {
  8. System.out.println("Leave "+thisJoinPointStaticPart);
  9. }
  10. }
  11. class TestClass {
  12. public static void main(String[] args) { }
  13. }