I have a AspectJ - Project with a aspect to making some System.out.println
's to learning a little bit about aspects etc.
The Problem is, that the advices which i define to the cuts doesn't work. The warning which is shown is: advice defined in ShapeAspect has not been applied [Xlint:adviceDidNotMatch]
I'm working with a Mac OS X 10.10 Yosemite, Eclipse Luna Service Release 2 (4.4.2) and AspectJ Runtime: org.aspectj.runtime_1.8.5.20150128171000.jar, for the LTW classes etc.: org.aspectj.weaver_1.8.5.20150128171000.jar and additionally org.aspectj.ajde_1.8.5.20150128171000.jar.
My simple defined aspect:
public aspect ShapeAspect {
// pointcuts
pointcut myPointcut2() : execution(oldshape.Point.new(..));
// advices
before() : myPointcut2(){
System.out.println("Before init.");
}
}
But at the line of before()..
is the Warning: advice defined in ShapeAspect has not been applied [Xlint:adviceDidNotMatch]
What is the Problem here? On my PC with Windows it works correctly?
Aucun commentaire:
Enregistrer un commentaire