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.

CodeAspect.java 371B

1234567891011121314
  1. import java.lang.Class;
  2. import org.aspectj.lang.reflect.MethodSignature;
  3. import org.aspectj.lang.*;
  4. public aspect CodeAspect {
  5. pointcut getPointcut()
  6. : execution(public * example.AOPTest.cleanup());
  7. Object around() : getPointcut() {
  8. System.out.println("ASPECT WORKING");
  9. //Just call the underlying method
  10. return proceed();
  11. }
  12. }