1 2 3 4 5 6 7 8 9 10 11 12 13
public aspect Logging { pointcut methods () : execution(* *..*(..)) && !within(Logging); before () : methods () { System.err.println("> " + thisJoinPoint.getSignature().toLongString()); } after () : methods () { System.err.println("< " + thisJoinPoint.getSignature().toLongString()); } }