dev@jsr311.java.net

Re: JSR311: TypeLiteral

From: Stephan Koops <Stephan.Koops_at_web.de>
Date: Wed, 04 Jun 2008 12:56:00 +0200

Hi,
>
> public Response<List<Bean>> getList() { ... }
>
>
> In this example, it is not possible to determine the parameterized
> type of the returned object via reflection due to type erasure. You
> *can* actually do it by inspecting the method signature, but this is a
> somewhat unreliable workaround.
How should the generic type be detected for
public List<Bean> getList() {...}
without reflecting the method?

BTW: the javadoc of the MessageBodyWriter uses as example a field to
write. Can you give a use case for this?

best regards
   Stephan