Hi,
I wonder if it is possible to mixed injected parameters with user passed parameters. Let me try to illustrate with an example in scala.
Imagine a class using a remote service. Let's say I would like to inject some configuration parameters for the service, such as the end point VIP and the service path. At the same time I want to be able to instantiate this object with some specific credentials.
// Config class in module
@Provides
@Singleton
def provideClientConf(injector: Injector): ClientConf = {
// some code reading conf
val vip = //read the vip
val servPath = //read the path
ClientConf(vip, servPath)
}
//The client class that injects the config
class Client @Inject(myConf: ClientConf, ClientID: String) = ???
Now, I would like to inject serviceVIP, and servicePath, but pass the ClientID
val myClient = new Client ("myClientID")
Is that possible in Guice?