Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] Re: Joinpoint where the return value implements an interface?

Nevermind I guess.... I solved the problem using annotations.

But good god! All of the reflection code to do what I wanted is ugly as hell!

Thanks,
james

On Dec 27, 2007 7:39 PM, James Carr <james.r.carr@xxxxxxxxx> wrote:
> Hi All,
>
> I have a problem where I am trying to apply an around advice to
> methods that return multiple unrelated concrete objects of some type,
> but implement an interface for the sole purpose of allowing the aspect
> to set a value on the return value after execution.
>
> I tried the following joinpoint pattern:
> call(Timeable *(..)) && !within(ElapsedTimeLogger)
>
> but it doesn't work of course unless the return type is specifically
> Timeable. how can I modify the pattern so that it matches any method
> that returns a type that implements Timeable?
>
> Thanks,
> James
>


Back to the top