Java Generics - "super" keyword usage

Avinash Lakshman <[email protected]>
Newsgroups gmane.comp.windows.devel.java.advanced
Message-ID <[email protected]>
Hi All 

This has been driving me insane. I am pretty sure it is very simple and hopefully someone can clear this up for me. What is wrong with the following:

public <T super IColumn> ICompactSerializer<T> serializer()
    {
        return new MyColumnSerializer();
    }

class MyColumnSerializer implements ICompactSerializer<MyColumn>
{
    public void serialize(MyColumn column, DataOutputStream dos) throws IOException
    {
    }

    public MyColumn deserialize(DataInputStream dis) throws IOException
    {
        return null;
    }
}

It complains about the "super" keyword. However the same compiles with the "extends" keyword. Now this method is defined in an interface called IColumn. I want any class that implements this serializer() method to pass its type to the ICompactSerializer template argument. Is this doable and if so what am I doing wrong?

Thanks
Avinash

_________________________________________________________________
Can you find the hidden words?  Take a break and play Seekadoo!
http://club.live.com/seekadoo.aspx?icid=seek_wlmailtextlink
===================================
This list is hosted by DevelopMentor®  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.