Also posted on Stack Overflow <http://stackoverflow.com/q/8734826/403455>.

Using Guice, I want to inject a bounded-wildcard class. To be clear, I 
don't want to inject an *object*, but inject a *class type*. I think the 
constructor should look something like this:

class A {
   class<?> a;
   @Inject A(TypeLiteral<Class<? extends SuperClass>> a) {
      this.a = a.getRawType();
   }
}

Is the above code is correct? How can I bind the TypeLiteral?
Thanks!
Jeff

-- 
You received this message because you are subscribed to the Google Groups 
"google-guice" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-guice/-/fws3GZJpd34J.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-guice?hl=en.

Reply via email to