Q:

Create TypeLiteral from generic method parameterType

Using : Guice 3
I would like to know how to create a TypeLiteral from a generic method parameterType (to inject it with an injector). 
Here is an example :
Context : 
bind(new TypeLiteral<Set<String>>(){}).toInstance(x);
bind(new TypeLiteral<Set<Integer>>(){}).annotatedWith(INJECTOR.class).toInstance(y);

public class Foo
{

public void bar(Injector injector, Set<String> param, @INJECTOR Set<Integer> value)
{
    //...
}

}

public class Example
{
@Inject
Injector injector;

public void methodInjector()
{
    Method[] fooMethods = Foo.class.getMethods();
    for(Method m : fooMethods)
    {
        for(Class<?> c : m.getParameter.getParameterTypes())
        {
            Object o = injector.getInstance(c); 

            /*
              this work for simple Type like "Injector" but 
              don't work for generic type (Set<String>, List<Set<String>>, ...).
            */
        }
    }

}

}

Obviously injecting java.util.Set don't work in my case... Maybe there is a trick with TypeLiteral to do it...
I hope that my explanation is clear,
Thanks.

A:

I found a solution using TypeLiteral.getParameterTypes(Member)

