diff options
Diffstat (limited to 'tests/bugs150')
-rw-r--r-- | tests/bugs150/pr118599/AnAttributedClass.java | 6 | ||||
-rw-r--r-- | tests/bugs150/pr118599/Attributable.java | 20 |
2 files changed, 26 insertions, 0 deletions
diff --git a/tests/bugs150/pr118599/AnAttributedClass.java b/tests/bugs150/pr118599/AnAttributedClass.java new file mode 100644 index 000000000..f8a4cdc8c --- /dev/null +++ b/tests/bugs150/pr118599/AnAttributedClass.java @@ -0,0 +1,6 @@ +public class AnAttributedClass implements Attributable { + + public void doSomething() { + this.setAttribute("foo", "bar"); + } +} diff --git a/tests/bugs150/pr118599/Attributable.java b/tests/bugs150/pr118599/Attributable.java new file mode 100644 index 000000000..a6add76ae --- /dev/null +++ b/tests/bugs150/pr118599/Attributable.java @@ -0,0 +1,20 @@ +import java.util.*; +public interface Attributable { + + void setAttribute(String name, Object attribute); + Object getAttribute(String name); + + static aspect DefImpl { + + private Map<String,Object> Attributable.attributes = + new HashMap<String,Object>(); + + public void Attributable.setAttribute(String name, Object attribute) { + this.attributes.put(name, attribute); + } + + public Object Attributable.getAttribute(String name) { + return this.attributes.get(name); + } + } +} |