Hi Owen,
Traced is a protected interface that is defined within
Log4jExecutionTracing itself. You just use the aspect by extending it and using
declare parents to make the relevant classes you want to trace implement
traced, as in:
public aspect MyLog4jExecutionTracing extends
Log4jExecutionTracing {
declare parents: com.bigboxco.myapp..*
implements Traced;
}
From: aspectj-users-bounces@xxxxxxxxxxx
[mailto:aspectj-users-bounces@xxxxxxxxxxx] On Behalf Of Owen Corpening
Sent: Thursday, October 09, 2008 6:41 AM
To: aspectj-users@xxxxxxxxxxx
Subject: [aspectj-users] question on ajlib:
With regards to ajlib:
http://fisheye.codehaus.org/browse/ajlib-incubator/org.codehaus.ajlib
There is a class Log4jExecutionTracing not covered in the
unit tests and for which there are no examples of its usage. It uses a class
called "Traced" that I don't see anywhere and I *think* that is at
the core of my not comprehending how to use this class.
Basically if I have a test tracing aspect like this it works great
(DummyObject is the class whose methods are to be traced):
import org.codehaus.ajlib.util.tracing.ExecutionTracing;
public aspect TestTraceAspect extends ExecutionTracing
public pointcut
scope() : within(DummyObject);
System.out.println("Tracing");
But if I change ExecutionTracing to Log4jExecutionTracing it
doesn't weave anything (advice defined in com.AjlibTest.TestTraceAspect has not
been applied [Xlint:adviceDidNotMatch]).
Owen