On Thursday, 7 January 2016 20:09:06 UTC-5, [email protected] wrote: > > Now, let's say I want to be really, really fancy, and extract the > parametrized type "*HttpServerExchange*" *from the getServerClass() > return*... So the dev wouldn't even have to define "*getServerType()*"! > Do you think it's possible? >
TypeLiteral<?> iserverType = TypeLiteral.get(getServerClass()).getSupertype( IServer.class); Type serverType = ((ParameterizedType) iserverType.getType()). getActualTypeArguments()[0]; -- You received this message because you are subscribed to the Google Groups "google-guice" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/google-guice. To view this discussion on the web visit https://groups.google.com/d/msgid/google-guice/69f1e6fa-4094-4539-aae4-7a4b8ef40edc%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
