Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-dev] AJ 5 - "boolean Pointcut.matches(JoinPoint)" possible?

It was my original intention to provide this level of functionality in the reflection packages (together with support for something like Advice.invoke which would be useful for testing).  We ran out of time to do all of that in 1.5.0, so I decided to implement only the "passive" (structural reflection) parts and defer the other parts.

The runtime matching should be pretty straightforward to implement - there's a lower-level version of the functionality already implemented in the weaver.tools API (PointcutParser and friends).

It requires more work, but I'm also considering supporting "advised by" etc. relations in the reflection API. This would give the ability to look at any single class in isolation and get the crosscutting structure information for it (without having to do a full weave to generate a structure model as we do today). The use case for this is browsing e.g. jars with source attachments that you did not build yourself with AJDT. I'd be interested to hear from anyone who would really value such a feature...

Regards, Adrian.

On 24/12/05, Eric Bodden <eric.bodden@xxxxxxxxxxxxxx> wrote:

Hi all.

I finally found some time today to read through the documentation of the new reflective API. I looks really nice! What I am missing for some applications is however the ability to do runtime matching. So it would be awesome if one could fetch a Pointcut p and a Joinpoint jp ( e.g. thisJoinPoint could be such an instance) and then ask "p.matches(jp)".

Are there any technical issues that would prevent this from being doable efficiently? I guess the largest overhead would be that the PointcutExpressed would have to be parsed. However, this could be done at compile time already and only for places where it is necessary.

Merry Christmas,

Eric


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





--
-- Adrian
adrian.colyer@xxxxxxxxx

Back to the top