Reverse engineering generics

I have this simple line in my class:
public ArrayList allItems=new ArrayList();

Why doesn't it create any association to the MyItem?

This line does:
public MyItem oneItem=new MyItem();

Comments

  • Hi Stringer,

    you probably tried to post public ArrayList<MyItem> allItems=new ArrayList<MyItem>();, didn't you? In your question the generics were removed by the forum software.
    From the top of my head I'd say you need to declare public List<MyItem> allItems=new ArrayList<MyItem>(); to match our default template set. Or you can change the template to allow ArrayList in the attribute declaration as well.

    Best regards,
    Christian
Sign In or Register to comment.