Hi,
I have written this pointcut

pointcut annotatedWithManageConnection(ManageConnection m): (call(void *(..) throws Exception+) && @args(m)) ;

I was expecting that this will only pick call to methods whose first argument is annotated with @ManageConnection but somehow it appears to be picking all the methods with single argument including following

   public void onlyParamIsString(String string) throws Exception {
}

   public void onlyParamIsConnection(Connection conn) throws Exception{
}
I also tried this pointcut
pointcut annotatedWithManageConnection(): (execution(void *((@ManageConnection *)) throws Exception+) ) ; which gives warning "does not match because annotation @util.ManageConnection has @Target{ElementType.PARAMETER} [Xlint:unmatchedTargetKind]"

What am I doing wrong?

Regards
Tahir Akhtar
_______________________________________________
aspectj-users mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/aspectj-users

Reply via email to