I have an abstract class which are implementing some basic interface. (attack method is not inherited from basic interface)
public abstract class AbstractClass implements BasicInterface {
public void attack(String attackerId, float attackerAttackSpeed) {
... // method body
}
}
I have also an class which are extending abstract class.
@Service
public class A extends AbstractClass {
// other methods...
}
Right now im trying to observe method attack(String attackerId, float attackerSpeedAttack)
@Aspect
@Component
public class AspectJ{
@After(value = "execution(* package.A.attack(attackerId, ..)) && args(attackerId)")
public void broadcastAttackMessage(String attackerId) {
... //method body
}
}
But unfortunately Intellij told me that This advise advises to no methods. Also during starting the application i received error with a stack trace :
Caused by: java.lang.IllegalArgumentException: error at ::0 name binding only allowed in target, this, and args pcds
What i'm doing wrong? Is there any way to observe method from super class? Do i miss something?