[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[List Home]
|
[aspectj-users] Parameter annotation being ignored
|
- From: Tahir Akhtar <tahir@xxxxxxxxxxxxxxxxxxx>
- Date: Mon, 22 Jun 2009 13:29:55 +0500
- Delivered-to: aspectj-users@eclipse.org
- User-agent: Thunderbird 2.0.0.21 (Windows/20090302)
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