diff options
Diffstat (limited to 'tests/bugs193/543657/MoodIndicator.java')
-rw-r--r-- | tests/bugs193/543657/MoodIndicator.java | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/bugs193/543657/MoodIndicator.java b/tests/bugs193/543657/MoodIndicator.java new file mode 100644 index 000000000..b42b2bce6 --- /dev/null +++ b/tests/bugs193/543657/MoodIndicator.java @@ -0,0 +1,24 @@ +import org.aspectj.lang.annotation.*; + +enum Mood {HAPPY,SAD} +@Aspect +public class MoodIndicator { + + public interface Moody { Mood getMood(); }; + + public static class MoodyImpl implements Moody { + private Mood mood = Mood.HAPPY; + + public Mood getMood() { return mood; } + } + + @DeclareMixin("Code*") + public static Moody createMoodyImplementation() { + return new MoodyImpl(); + } + + @Before("!within(MoodIndicator*) && execution(* *.run(..)) && this(m)") + public void feelingMoody(Moody m) { + System.out.println("I'm feeling " + m.getMood()); + } +} |