Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] How to apply advice to an interface in a jar?

How can add an advice to the methods of java.util.List?

I include the following into weaver options in aop.xml

<aspectj>
<aspects>
<aspect name="TestInterfaceAspect" />
</aspects>

<weaver options="-verbose -showWeaveInfo">
<include within="java.util.*"/>
</weaver>
</aspectj>

And

@Aspect
public class TestInterfaceAspect {

@Before("execution(* java.util.List.*(..))")
public void beforeListOperations(JoinPoint jp) {
System.out.println("Call " + jp.getSignature().toShortString());
}
}

but I always get a warning "advice defined in TestInterfaceAspect has not been appliedĀ [Xlint:adviceDidNotMatch]"?

I'm using Eclipse 3.5 with AJDT.

Back to the top