001 // Not described in paper. 002 // Used in exampleprogs/Compiler.java 003 // Illustrates an imperative aspect (ordinary methods). 004 005 aspect PrettyPrint { 006 public void StateMachine.pp() { 007 for (Declaration d:getDeclarationList()) { 008 d.pp(); 009 } 010 } 011 012 public void Declaration.pp() {} 013 014 public void State.pp() { 015 System.out.println("state "+getLabel()+";"); 016 } 017 018 public void Transition.pp() { 019 System.out.println("trans "+getLabel()+":"+getSourceLabel()+"->"+getTargetLabel()+";"); 020 } 021 }