1 7 package local; 8 9 10 import ch.ethz.prose.DefaultAspect; 12 import ch.ethz.prose.crosscut.Crosscut; 13 import ch.ethz.prose.crosscut.MethodCut; 14 import ch.ethz.prose.crosscut.REST; 15 import ch.ethz.prose.filter.PointCutter; 16 import ch.ethz.prose.filter.Executions; 17 import ch.ethz.prose.filter.Within; 18 import ch.ethz.prose.crosscut.MissingInformationException; 19 20 26 public 27 class ExampleAspect extends DefaultAspect { 28 29 public Crosscut c1 = new MethodCut() 30 { 31 public void METHOD_ARGS(Foo x, String arg1,REST y) 33 { 34 System.err.println(" ->advice: before "+ x + ".'bar*'("+ arg1 +",..) called"); 35 } 36 37 protected PointCutter pointCutter() 39 { return (Executions.before() . AND (Within.method("bar.*")) );} 40 }; 41 } 42 43 44 | Popular Tags |