mirror of
https://github.com/eclipse-aspectj/aspectj.git
synced 2024-09-02 17:55:19 +02:00
20 lines
392 B
Java
20 lines
392 B
Java
package mypackage;
|
|
|
|
public aspect MyAspect {
|
|
|
|
pointcut executeMethod(): within(TestClass) && execution(* *(..));
|
|
|
|
before(): executeMethod() {
|
|
System.out.println("Enter "+thisJoinPointStaticPart);
|
|
}
|
|
after(): executeMethod() {
|
|
System.out.println("Leave "+thisJoinPointStaticPart);
|
|
}
|
|
}
|
|
|
|
class TestClass {
|
|
|
|
public static void main(String[] args) { }
|
|
|
|
}
|