[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [aspectj-users] @DeclareParents disallowed
|
Are you correctly setting the inpath to include the rife jars? The execution pointcut will be weaved
against Rife classes, so I think you should provide rife jars in the inpath.
./alex
--
.w( the_mindstorm )p.
#: Raoul Pierre changed the world a bit at a time by saying on 11/19/2005 1:37 PM :#
Andy, Alex,
Thank you for your help.
Yes it has. Check the developer notebook included with the aspectj
distribution, the version on the AJ website hasnt been updated yet.
Here is a snippet relevant to what you are doing:
Now with code below, the aspect detects "407 AspectJ markers at this line"!
Good but ... the after advice is never executed.
With a simple after advice, without declare parents statement,
everything is ok.
Any idea?
Pierre
===========================
package com.uwyn.ecalendar.aop;
import org.aspectj.lang.annotation.After;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.DeclareParents;
@Aspect
public class TestAop3 {
@DeclareParents("com.uwyn.rife.engine.ElementSupport+")
public static Moody introduced = new MoodyImpl();
@After("execution(public static String
com.uwyn.rife.config.RifeConfig.Tools.getDefaultLanguage()) && this(m)")
public void feelingMoody(Moody m) {
System.out.println("[TestAop3.feelingMoody] after
RifeConfig.Tools.getDefaultLanguage: " + m.getMood());
}
}
===========================
package com.uwyn.ecalendar.aop;
public interface Moody {
String getMood();
};
===========================
package com.uwyn.ecalendar.aop;
public class MoodyImpl implements Moody {
private String mood = "Mood.HAPPY";
public String getMood() {
return this.mood;
}
}
_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users
!DSPAM:437f0f2b67611136370219!