Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] question on ajlib:

From what I see looking at:

http://fisheye.codehaus.org/browse/ajlib-incubator/org.codehaus.ajlib/src/org/codehaus/ajlib/util/tracing/Log4jExecutionTracing.aj?r=1.3

the Traced interface is defined inside Log4jExecutionTracing and appears to be a marker interface that should be implemented by types you want to have traced.  I also see Log4JExecutionTracing changes
the aspect instantiation model to pertypewithin based on the Traced interface.  I haven't played around with it, but it would look like they expect you 
to implement Traced or declare parents of Traced on the types you want affected by it...

Andy.

2008/10/9 Owen Corpening <owencorpening@xxxxxxxxx>
With regards to 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):

package com.AjlibTest;
import org.codehaus.ajlib.util.tracing.ExecutionTracing;
public aspect TestTraceAspect extends ExecutionTracing
{
public pointcut scope() : within(DummyObject);
before(): scope()
{
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]).

much appreciated,
Owen



_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users



Back to the top