[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] Applying @DeclareParents to annotated classes

Ok Scott ...

Are you able to download and try the latest AspectJ?  Fresh off the presses, from our download page or directly through this link:


This *will* fix your annotation problem.  It may also affect the other problem where you needed to create the proxy interface - are you able to try it in that situation too?


On 29/03/06, Andy Clement <andrew.clement@xxxxxxxxx> wrote:
I've had a look ... and it is a bug ... I have a fix and it should be available later this afternoon.  When it's done, you will be able to do:

@DeclareParents(value="@Audit *",defaultImpl= ApplicationContextAwareImpl.class)
private ApplicationContextRetriever implementedInterface;


On 29/03/06, Scott <aspectj-users@xxxxxxxxxxx> wrote:
I am having trouble with this. I am wanting to declare a parent on any class that has and @Audit annotation on it. Here is my code:


@DeclareParents(value="@Audit *.*",defaultImpl= ApplicationContextAwareImpl.class)
private ApplicationContextRetriever implementedInterface;


I have tried many varients of value="@Audit":

1. @Audit *.*
2. @Audit com..logic.*
3. @Audit com.company.somepackages.logic.Reader

These start working only when I take the annotation off. The last two in particular are specific to classes that would probably be using the annotation. However, I would like to match any class that has the @Audit annotation, regardless of where it is located. The idea is that auditing will happen on any class that has the @Audit annotation on the class and each method to audit. But I cannot get this to work.


aspectj-users mailing list