Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] does not match because annotation has @Target{ElementType.METHOD}

Looks like a bug to me, given that the subject at the relevant
joinpoint should be a method object.

Andy

On 20 July 2010 05:00, Luca Ferrari <fluca1978@xxxxxxxxxxx> wrote:
> Hi all,
> I've got the following pointcut:
>
> private pointcut avoidLockedMethodInvocation( AgentProxy proxy, Lock
> lockingAnnotation ) : call( public @Lock * AgentProxy+.*(..) )
>                                                                        &&
>                                                                        @annotation(lockingAnnotation)
>                                                                        &&
>                                                                        target( proxy );
>
> that is I'd like to advice any method call that is annotated with @Lock. The
> problem is that the ajdt tells me that:
>
> does not match because annotation @Lock has @Target{ElementType.METHOD}
> [Xlint:unmatchedTargetKind]
>
> that is right, since I'd like to lock some method execution. What am I doing
> wrong here?
>
> Thanks,
> Luca
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>


Back to the top