[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[aspectj-users] Name clash errors
|
Hi,
Since all my efforts to add overridden methods directly to EcoreEList<E> have been unsuccessful I tried to declare a new parent for EcoreEList. The original hierarchy was:
public class NotifyingListImpl<E> extends BasicEList<E> implements NotifyingList<E>
public class EcoreEList<E> extends NotifyingListImpl<E> implements InternalEList.Unsettable<E>, EStructuralFeature.Setting
and now it should be:
public class NotifyingListImpl<E> extends BasicEList<E> implements NotifyingList<E>
public class CDOEcoreEList<E> extends NotifyingListImpl<E>
public class EcoreEList<E> extends CDOEcoreEList<E> implements InternalEList.Unsettable<E>, EStructuralFeature.Setting
I tried to achieve this with:
declare parents: EcoreEList extends CDOEcoreEList;
But now I get various build errors like:
- Name clash: The method add(E) of type CDOEcoreEList has the same erasure as add(E) of type Collection<E> but does not override it
- The method didAdd(int, E) of type EcoreEMap<K,V>.DelegateEObjectContainmentEList<E> must override a superclass method
- The return type is incompatible with EList<E>.move(int, int), CDOEcoreEList.move(int, int)
- The type EcoreEList<E> must implement the inherited abstract method InternalEList<E>.addUnique(E)
- Type mismatch: cannot convert from element type Object to EGenericType
First I thought I have to
declare parents: EcoreEList<E> extends CDOEcoreEList<E>;
But that leads to:
- can't bind type name 'E'
- no match for this type name: E [Xlint:invalidAbsoluteTypeName]
Can anybody help me pleaease.
/Eike
BTW. This is the pure Java5 code for my CDOEcoreEList:
public class CDOEcoreEList<E> extends NotifyingListImpl<E>
{
private static final long serialVersionUID = 1L;
public CDOEcoreEList()
{
}
@Override
public boolean add(E object)
{
return super.add(object);
}
@Override
public void add(int index, E object)
{
super.add(index, object);
}
@Override
public boolean addAll(Collection<? extends E> collection)
{
return super.addAll(collection);
}
@Override
public boolean addAll(int index, Collection<? extends E> collection)
{
return super.addAll(index, collection);
}
@Override
public boolean addAllUnique(Collection<? extends E> collection)
{
return super.addAllUnique(collection);
}
@Override
public boolean addAllUnique(int index, Collection<? extends E> collection)
{
return super.addAllUnique(index, collection);
}
@Override
public boolean addAllUnique(int index, Object[] objects, int start, int end)
{
return super.addAllUnique(index, objects, start, end);
}
@Override
public boolean addAllUnique(Object[] objects, int start, int end)
{
return super.addAllUnique(objects, start, end);
}
@Override
public void addUnique(E object)
{
super.addUnique(object);
}
@Override
public void addUnique(int index, E object)
{
super.addUnique(index, object);
}
@Override
public void clear()
{
super.clear();
}
@Override
public Object clone()
{
return super.clone();
}
@Override
public boolean contains(Object object)
{
return super.contains(object);
}
@Override
public boolean containsAll(Collection<?> collection)
{
return super.containsAll(collection);
}
@Override
public boolean equals(Object object)
{
return super.equals(object);
}
@Override
public E get(int index)
{
return super.get(index);
}
@Override
public int hashCode()
{
return super.hashCode();
}
@Override
public int indexOf(Object object)
{
return super.indexOf(object);
}
@Override
public boolean isEmpty()
{
return super.isEmpty();
}
@Override
public Iterator<E> iterator()
{
return super.iterator();
}
@Override
public int lastIndexOf(Object object)
{
return super.lastIndexOf(object);
}
@Override
public ListIterator<E> listIterator()
{
return super.listIterator();
}
@Override
public ListIterator<E> listIterator(int index)
{
return super.listIterator(index);
}
@Override
public void move(int index, E object)
{
super.move(index, object);
}
@Override
public E move(int targetIndex, int sourceIndex)
{
return super.move(targetIndex, sourceIndex);
}
@Override
public E remove(int index)
{
return super.remove(index);
}
@Override
public boolean remove(Object object)
{
return super.remove(object);
}
@Override
public boolean removeAll(Collection<?> collection)
{
return super.removeAll(collection);
}
@Override
public boolean retainAll(Collection<?> collection)
{
return super.retainAll(collection);
}
@Override
public E set(int index, E object)
{
return super.set(index, object);
}
@Override
public E setUnique(int index, E object)
{
return super.setUnique(index, object);
}
@Override
public int size()
{
return super.size();
}
@Override
public List<E> subList(int fromIndex, int toIndex)
{
return super.subList(fromIndex, toIndex);
}
@Override
public Object[] toArray()
{
return super.toArray();
}
@Override
public String toString()
{
return super.toString();
}
}