Hi,
I have a class that extends AbstractGinModule
like:
public class ClientModule extends AbstractGinModule {
public ClientModule() { }
@Override
protected void configure() {
...
...
bind(...class).annotatedWith(...).to(...class).in(Singleton.class);
...
}
}
The idea that I have is to bind one class with another class based on a value stored in a property file.
like:
param contains the value coming from the property file
if(param.equals("instanceB"))
bind(a.class).to(b.class)
else
bind(a.class).to(c.class)
I have a class that access this property file and return a string with the value. This class is called: InstanceParameters.java
I would like to get an instance of this class within my ClientModule. But I don't find any way to do it. I tried with:
- InstanceParameters param = new InstanceParameters ();
- GWT.create(InstanceParameters.class); (Error because this method should only be used on the client side)
Is there a way to access this InstanceParameters class within this clientModule?
Thank you for your help