I am implementing an interface from an an aspect
declare parents: SomePackage.AClass+ extends InterfaceBelow
public interface InterfaceBelow() {
//bunch of methods
}
I want a method which should return the class/instance implementing the interface itself. Something such as adding a method to the interface public Object getSelf() and then use AspectJ to implement it like this:
public InterfaceBelow.getSelf()
{
//how to return the instance implementing the interface
}
I need to do it in the aspect not from the class and then {return this;}
have InterfaceBelow.getSelf() return null. then create an around pointcut around that method. the pointcut can capture the target of the method invocation. return that instead.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With