Passer des paramètres au constructeur avec Guice

J'ai une usine comme ci-dessous,

public final class Application {

    private static IFoo foo;

    public static IFoo getFoo(String bar)
    {
        //i need to inject bar to the constructor of Foo
        //obvious i have to do something, not sure what
        Injector injector = Guice.createInjector();
        logger = injector.getInstance(Foo.class);
        return logger;              
    }

}

C'est le Foo définition:

class Foo
{
   Foo(String bar)
   {

   }

}

OK. Je ne suis pas sûr de savoir comment je peux passer ce paramètre à Toto constructeur avec Guice?

Des idées?

InformationsquelleAutor DarthVader | 2012-02-11