Skip to main content

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

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


Back to the top