@@ -0,0 +1,4 @@ | |||
aspect ConcreteSimpleTracing extends SimpleTracing | |||
{ | |||
pointcut tracedCall(): execution(void doSomething(String)); | |||
} |
@@ -0,0 +1,8 @@ | |||
abstract aspect SimpleTracing perthis(tracedCall()) | |||
{ | |||
abstract pointcut tracedCall(); | |||
before(): tracedCall() { | |||
System.out.println("Entering: " + thisJoinPoint); | |||
} | |||
} |
@@ -0,0 +1,13 @@ | |||
public class TestClass | |||
{ | |||
public void doSomething(String stuff) | |||
{ | |||
System.out.println("TestClass.doSomething(\""+stuff+"\")"); | |||
} | |||
public static void main(String[] args) | |||
{ | |||
TestClass test = new TestClass(); | |||
test.doSomething("withThis"); | |||
} | |||
} |