aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bugs150/pr113947/case1
diff options
context:
space:
mode:
authoraclement <aclement>2005-10-27 16:00:45 +0000
committeraclement <aclement>2005-10-27 16:00:45 +0000
commit426188d738b9dfbca6b75f68accf853b76dad1cd (patch)
treed1dcbf0cd7d0ea69ae81274b0210e8af9f76ab37 /tests/bugs150/pr113947/case1
parent2da9b31be2c1e5af9d33b25be798f3a47362fb88 (diff)
downloadaspectj-426188d738b9dfbca6b75f68accf853b76dad1cd.tar.gz
aspectj-426188d738b9dfbca6b75f68accf853b76dad1cd.zip
matthews generic aspect: testcode for pr113947
Diffstat (limited to 'tests/bugs150/pr113947/case1')
-rw-r--r--tests/bugs150/pr113947/case1/AbstractListSupport.java16
-rw-r--r--tests/bugs150/pr113947/case1/AnotherItem.java5
-rw-r--r--tests/bugs150/pr113947/case1/Item.java5
-rw-r--r--tests/bugs150/pr113947/case1/LinkedList.java145
-rw-r--r--tests/bugs150/pr113947/case1/LinkedListItem.java4
-rw-r--r--tests/bugs150/pr113947/case1/ListItem.java5
-rw-r--r--tests/bugs150/pr113947/case1/StringList.java126
7 files changed, 306 insertions, 0 deletions
diff --git a/tests/bugs150/pr113947/case1/AbstractListSupport.java b/tests/bugs150/pr113947/case1/AbstractListSupport.java
new file mode 100644
index 000000000..facc7e37c
--- /dev/null
+++ b/tests/bugs150/pr113947/case1/AbstractListSupport.java
@@ -0,0 +1,16 @@
+
+public abstract aspect AbstractListSupport<I,M extends I> {
+
+ declare parents : @LinkedListItem * implements M;
+
+ private M M.next;
+
+ public I M.getNext () {
+ return next;
+ }
+
+ public void M.setNext (M item) {
+ next = item;
+ }
+
+}
diff --git a/tests/bugs150/pr113947/case1/AnotherItem.java b/tests/bugs150/pr113947/case1/AnotherItem.java
new file mode 100644
index 000000000..7dc0851b7
--- /dev/null
+++ b/tests/bugs150/pr113947/case1/AnotherItem.java
@@ -0,0 +1,5 @@
+
+@LinkedListItem
+public class AnotherItem {
+
+}
diff --git a/tests/bugs150/pr113947/case1/Item.java b/tests/bugs150/pr113947/case1/Item.java
new file mode 100644
index 000000000..fe9a2234c
--- /dev/null
+++ b/tests/bugs150/pr113947/case1/Item.java
@@ -0,0 +1,5 @@
+
+public class Item {
+
+
+}
diff --git a/tests/bugs150/pr113947/case1/LinkedList.java b/tests/bugs150/pr113947/case1/LinkedList.java
new file mode 100644
index 000000000..a20507a9d
--- /dev/null
+++ b/tests/bugs150/pr113947/case1/LinkedList.java
@@ -0,0 +1,145 @@
+
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.List;
+import java.util.ListIterator;
+
+public class LinkedList implements List<ListItem> {
+
+ public boolean add (ListItem item) {
+ MutableListItem listItem = (MutableListItem)item;
+ listItem.setNext(null);
+
+ return true;
+ }
+
+ public ListItem get (int i) {
+ return new Item();
+ }
+
+ public void add(int index, ListItem element) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public boolean addAll(Collection<? extends ListItem> c) {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public boolean addAll(int index, Collection<? extends ListItem> c) {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public void clear() {
+ // TODO Auto-generated method stub
+
+ }
+
+ public boolean contains(Object o) {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public boolean containsAll(Collection<?> c) {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public int indexOf(Object o) {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ public boolean isEmpty() {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public Iterator<ListItem> iterator() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public int lastIndexOf(Object o) {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ public ListIterator<ListItem> listIterator() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public ListIterator<ListItem> listIterator(int index) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public ListItem remove(int index) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public boolean remove(Object o) {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public boolean removeAll(Collection<?> c) {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public boolean retainAll(Collection<?> c) {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public ListItem set(int index, ListItem element) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public int size() {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ public List<ListItem> subList(int fromIndex, int toIndex) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object[] toArray() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public <T> T[] toArray(T[] a) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ private interface MutableListItem extends ListItem {
+ public void setNext (MutableListItem o);
+ }
+
+ private static aspect LinkedListSupport {
+ declare parents : Item implements MutableListItem;
+ declare parents : @LinkedListItem * implements MutableListItem;
+
+ private MutableListItem MutableListItem.next;
+
+ public ListItem MutableListItem.getNext () {
+ return next;
+ }
+
+ public void MutableListItem.setNext (MutableListItem item) {
+ next = item;
+ }
+ }
+
+
+}
diff --git a/tests/bugs150/pr113947/case1/LinkedListItem.java b/tests/bugs150/pr113947/case1/LinkedListItem.java
new file mode 100644
index 000000000..180477528
--- /dev/null
+++ b/tests/bugs150/pr113947/case1/LinkedListItem.java
@@ -0,0 +1,4 @@
+
+public @interface LinkedListItem {
+
+}
diff --git a/tests/bugs150/pr113947/case1/ListItem.java b/tests/bugs150/pr113947/case1/ListItem.java
new file mode 100644
index 000000000..bc1651d22
--- /dev/null
+++ b/tests/bugs150/pr113947/case1/ListItem.java
@@ -0,0 +1,5 @@
+
+public interface ListItem {
+
+ public ListItem getNext ();
+}
diff --git a/tests/bugs150/pr113947/case1/StringList.java b/tests/bugs150/pr113947/case1/StringList.java
new file mode 100644
index 000000000..0692185e5
--- /dev/null
+++ b/tests/bugs150/pr113947/case1/StringList.java
@@ -0,0 +1,126 @@
+
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.List;
+import java.util.ListIterator;
+
+
+public class StringList implements List<ListItem> {
+
+ public void add(int index, ListItem element) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public boolean add(ListItem o) {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public boolean addAll(Collection<? extends ListItem> c) {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public boolean addAll(int index, Collection<? extends ListItem> c) {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public void clear() {
+ // TODO Auto-generated method stub
+
+ }
+
+ public boolean contains(Object o) {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public boolean containsAll(Collection<?> c) {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public ListItem get(int index) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public int indexOf(Object o) {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ public boolean isEmpty() {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public Iterator<ListItem> iterator() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public int lastIndexOf(Object o) {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ public ListIterator<ListItem> listIterator() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public ListIterator<ListItem> listIterator(int index) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public ListItem remove(int index) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public boolean remove(Object o) {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public boolean removeAll(Collection<?> c) {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public boolean retainAll(Collection<?> c) {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public ListItem set(int index, ListItem element) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public int size() {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ public List<ListItem> subList(int fromIndex, int toIndex) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object[] toArray() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public <T> T[] toArray(T[] a) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+
+}