interface number {} // blank type name aspect tracecreation // trace the creation of each number object { declare parents: rational implements number; declare parents: complex implements number; // only within this aspect are these declarations effective private int total = 0; // private w/r to aspect after(number R): execution(number+.new(..)) && target(R) { System.out.println("number object of "+R.getClass()+" created"); total++; } after() : execution(public static void *.main(String[])) { System.out.println(total+" total numbers were created.");} }// tracecreation aspect control // control who has priority. { declare precedence: control, *; declare precedence: printing, tracecreation; }