[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[aspectj-users] Access to the aspect in 'pertypewithin' type
- From: Andreas Mandel <Andreas.Mandel@xxxxxxxxx>
- Date: Thu, 31 Jan 2008 09:10:58 +0100
- Delivered-to: firstname.lastname@example.org
- User-agent: Thunderbird 188.8.131.52 (Windows/20071031)
I'm quite new to AspectJ so please apologize that some terms might not
fully hit the target.
I tried hard to find the 'pertypewithin' keyword which allows me to do
exactly what I wanted. (Guess what - debug logging and tracing). I'm
working with a 1.4 JDK. Inspecting the generated code there is one thing
that makes me unhappy because it is not as good as it could be:
To access the DeclaringType's aspect instance in the advice I need to
This generates code that calls the static aspectOf(Class) method of the
aspect to look up the DeclaringType's aspect instance via
reflection. This simply returns a pointer back to the member that is
already statically accessible in the DeclaringType
This could be directly accessible even in the static arrear (if(...))
allowing some major improvements - but unfortunately it not exposed to
Am I just missing an other key word to get direct access? Or is this a
feature that needs to be coded?
If needed I can give more details.
Thanks for any feedback,