[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] RE: newbie: wildcards in pointcuts

Hi Bill and Nicholas,

Thanks for your feedback.
During the weekend, outside of the project-deadline rush, I _did_ create a
demo-version of what I want to do with aspectj. As Nicholas requested. And
guess what: it worked the first time.
So that made me start the new week with new vigor.

I now find that my installation of eclipse 3M4 and AJDT 1.1.4 _does_ build
my project but does _not_ update the classes that are used when I run the
I guess that was the reason I did not get the whole thing working.
So I'll just have to switch to using ant for compiling my aspects.

My problems getting this to work made me wonder about the following:
Using wildcards for pointcuts makes it inevitable that I only find out at
runtime what classes/methods have been enhanced since the semantics of a
wildcard are basically "for all methods that fit this wildcard". So if no
methods do fit that's correct according to the aspect.
But since my aspect is a critical part of the application, and not some
add-on like logging, I want the aspect-compiler to give me feedback that
the pointcut that the aspect references does not exist.
In other words I think that I want to express an existential quantifier in
my pointcut and not a universal quantifier. Or just refer to a unique
metadata tag just like when I'm referencing a class.
Of course the new metadata spec in JDK 1.5 is ideal for this. I seem to
recall that Gregor is opposed to using metadata since the code that is
being enhanced should not have knowledge of the fact that it is being
But since my aspects are a critical part of the application I'm developing
there is no reason to avoid this construction. Both pieces of the code are
under the control of the same development team.
Actually not having the possibility to annotate the special semantics of
my service methods forces me to use elaborate naming conventions that
depend on the discipline of developers to keep uptodate with the aspect.
Anyhow, thanks you guys,


Joost de Vries