aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bugs150/pr110307/Problem1.java
diff options
context:
space:
mode:
Diffstat (limited to 'tests/bugs150/pr110307/Problem1.java')
-rw-r--r--tests/bugs150/pr110307/Problem1.java42
1 files changed, 42 insertions, 0 deletions
diff --git a/tests/bugs150/pr110307/Problem1.java b/tests/bugs150/pr110307/Problem1.java
new file mode 100644
index 000000000..b0b3f8d66
--- /dev/null
+++ b/tests/bugs150/pr110307/Problem1.java
@@ -0,0 +1,42 @@
+import java.lang.annotation.*;
+import java.lang.ref.*;
+
+class Product{}
+class ProductType{}
+
+interface AssociationSource<T> {
+
+ Link<T> getTarget();
+
+ void setTarget(Link<T> _target);
+
+}
+aspect ExtendProduct {
+ Link<T> AssociationSource._target = null;
+
+ public Link<T> AssociationSource.getTarget() {
+ return _target;
+ }
+
+ public void AssociationSource.setTarget(Link<T> _target) {
+ this._target = _target;
+ }
+
+ declare parents : ProductType implements AssociationSource<Product>;
+ declare parents : Product implements AssociationSource<Branch>;
+ declare parents : Branch implements AssociationSource<Revision>;
+}
+
+class Link<T> extends SoftReference {
+
+ @SuppressWarnings("unchecked")
+ Link(List<T> endPoints) {
+ super(endPoints);
+ }
+
+ @SuppressWarnings("unchecked")
+ public List<T> getEndPoints() {
+ return (List<T>)get();
+ }
+
+}