I have a class that extends AbstractGinModule
as:
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 associate one class with another class based on the value stored in the properties file.
as:
param contains the value coming from the properties file
if(param.equals("instanceB")) bind(a.class).to(b.class) else bind(a.class).to(c.class)
I have a class that accesses this properties file and returns a string with a value. This class is called: InstanceParameters.java
I would like to get an instance of this class in my ClientModule. But I find no way to do this. I tried:
- 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 in this client module?
thanks for the help
source share