Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] ITD based on annotations

Hello,

Currently, in order to do ITD based on annotations, we have to use interfaces, injecting code in the interface and not in the class itself, directly, like this:

declare parents : (@MyAnnotation *) implements MyInterface;

public void MyInterface.foo() { ... }

So, it's not possible to do ITD based on an annotation type, in the class itself... Something like this:

public void (@MyAnnotation *).foo() { ... }

And I was just wondering if there is any particular reason for it. Can you help me, please? :)

By the way, another issue, which is just a curiousity, is related to garbage collection for Aspects, when using the pertypewithin instantiation mechanism. So, with that kind of instantiation, we get a new instance of an aspect for each type, right? So, let us suppose we have an aspect that matches for a class called A and we create three instances of that class (creating only one instance of the aspect); and after a while, all those instances are garbage collected; what happens to the Aspect? Is it garbage collected too?

Thanks for your interest.

Cheers,

Paulo Zenida

----------------------------------------------------------------
Mensagem enviada usando o IMP (Internet Messaging Program).




Back to the top