package counting; import javax.swing.*; import jasco.runtime.aspect.*; class Counting { hook Counter { static int befores = 0; static int afters = 0; static int replaces=0; Counter(method(..args)) { execution(method); } before() { befores++; System.out.println("before:"+befores+";"); } after() { afters++; System.out.println("after:"+afters+";"); } around() { replaces++; System.out.println("replace:"+replaces+";"); return proceed(); } } }