I am new to AspectJ and still learning hot to write code.
I am trying to make a pointcut and advice for nextYear() method, but i keep getting "Warning:(39, 0) ajc: advice defined in ChristkindAspect has not been applied [Xlint:adviceDidNotMatch]". I understand that it is probably because an Object is not being directly created, and that i cannot use target(christkindenter code here), but i cannot find a solution. Can anybody help? Thank you in advance!
pointcut nextYear(Christkind christkind, Population population):
call(* *Christkind.nextYear(Population))&& args(population) &&
target(christkind);
before(Christkind christkind,Population population): nextYear(christkind,population) {
System.out.println("New Year");
populationSize(population);
numbOfWIshes(population);
//wishStrength(population); }
In main method i have:
Christkind.nextYear(population);
