I have the following aspectJ pointcut:
@Around(value="execution(* *(*,Map<String, Object>)) && @annotation(com.xxx.annotations.MyCustomAnnotation)")
As you can see, this pointcut only matches methods, annotated with com.xxx.annotations.MyCustomAnnotation, which have 2 arguments - the first one is arbitrary and the second one must be of type Map<String, Object>
.
Is there a way to configure the aspectj-maven-plugin to force compilation errors if it find methods that are annotated with com.xxx.annotations.MyCustomAnnotation, but don't match the signature * *(*,Map<String, Object>)
?
Or in other words, :
@com.xxx.annotations.MyCustomAnnotation
public void test(String s, Map<String, String> m) {
...
}
-> I want this to produce compile time error because Map<String, String>
!= Map<String, Object>