aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bugs193/543657/MoodIndicator2.java
diff options
context:
space:
mode:
Diffstat (limited to 'tests/bugs193/543657/MoodIndicator2.java')
-rw-r--r--tests/bugs193/543657/MoodIndicator2.java23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/bugs193/543657/MoodIndicator2.java b/tests/bugs193/543657/MoodIndicator2.java
new file mode 100644
index 000000000..b5de03784
--- /dev/null
+++ b/tests/bugs193/543657/MoodIndicator2.java
@@ -0,0 +1,23 @@
+import org.aspectj.lang.annotation.*;
+
+@Aspect
+public class MoodIndicator2 {
+
+ public interface Moody2 { Mood getMood2(); };
+
+ public static class Moody2Impl implements Moody2 {
+ private Mood mood = Mood.SAD;
+
+ public Mood getMood2() { return mood; }
+ }
+
+ @DeclareMixin("Code*")
+ public static Moody2 createMoodyImplementation() {
+ return new Moody2Impl();
+ }
+
+ @Before("!within(MoodIndicator*) && execution(* *.run(..)) && this(m)")
+ public void feelingMoody(Moody2 m) {
+ System.out.println("I'm feeling " + m.getMood2());
+ }
+}