> Note that it's possible to do this:
> 
> public <T> List<T> getList() {
>  return (List<T>)ts;
> }
> 
> without the ghastly Class<T> param

Yeah, that's the approach that I would prefer.

> Of course, this has the same problem of errors only showing up at
> runtime, and in a depressingly high number of cases, you still need to
> specify the <T> using Java's weird syntax - listView.<Foo>getList().

I had never even seen that syntax until recently. It IS really weird.

G

Reply via email to