2008/4/9, James Carman <[EMAIL PROTECTED]>:
> Does anyone have code that can take care of this situation:
>
>  List<String> strings = new ArrayList<String>();
>
>  Class returnType = getReturnType(strings.getClass(), "get", int.class);
>
>  I want the "returnType" to be java.lang.String.  Does anyone have code
>  that would return that?  Is it possible?

It's not possible:
http://java.sun.com/j2se/1.5.0/docs/guide/language/generics.html

<snip>
Generics are implemented by type erasure: generic type information is
present only at compile time, after which it is erased by the
compiler.
</snip>

Antonio

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to