How to match a method with an annotated argument in AspectJ-Collection of common programming errors

public pointcut annArg(): execution(@Foo * *(.., @Baz (*),..));

declare error :execution(@Foo * *(..))&&!annArg() :"error";

Unfortunatly it is impossible to grab matched argument by args(..,arg,..). But you can use thisJoinPoint.getArgs() and reflection API to get the annotated argument. Or if you know the position of the argument you can use something like args(..,arg);