[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[List Home]
|
[aspectj-users] Help with defining pointcut for method execution on interface hierarchy
|
- From: Johan Haleby <johan.haleby@xxxxxxxxx>
- Date: Thu, 10 Sep 2009 09:45:19 +0200
- Delivered-to: aspectj-users@eclipse.org
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=Qsssc7f9FDm/6bqXnP3N0627pyWv83umsj7VLRF2bm0=; b=K0zxvhbiQu562y2iWWeNGkpDK1ebQgHArAi2k5ge7Nlmr4qs7mX3Nh3QGP2fbMiN3w 40YAvmu0RebElchpUcCXHUTVMcY7vwICgS9U/EiIOIXdLBv3vymM6VMkp3sclw4FoUVR cXxhYvKPlqC7n8I9TP7KtWnr0SfervTsndl7o=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=ZXJhTRUPWQPatq8IojG+NoeTorFIlGkbnPXNX+v0g1muF3GU06b6XnKGUdejwq0wDK 2DPJ2p7y+AZLGyToGRUsGakEsQz9pxA9qvbZwW8whb89X+6hkrf1UIXAghuq6jrthX/Q LJwZj4gV1IQ4DmIi8IdtSNb0vNTNdBtLc6Dgk=
Hi,
I'd like to get some help to define a pointcut. I have an empty marker interface (A) from which several other interfaces extends e.g.
public interface B extends A {
void myMethodInB();
}
Then I have an implementation of B (BImpl) which also extends other interfaces that doesn't extend from A such as X, Y, and Z, e.g.
public class BImpl implements B, X, Y, Z {
public void myMethodInB() {
....
}
public void myMethodInX() {
....
}
...
}
I want to define a pointcut that only intercepts methods declared in a subinterface of A. So for example the only method that should be intercepted in BImpl is the myMethodInB method since B extends A. The other methods such as myMethodInX should not be intercepted. Does anyone know how a pointcut like this would look like?
Thanks
/Johan