I have a Guice module that has a @Provides method that takes 2 parameters and returns the implementation of the interface:
public class **ClientModule** extends **AbstractModule**{
@Override
protected void configure(){
}
@Singleton
@Provides
protected ClientInterfaces provideService(String param1, String param2){
returns something
}
}
In my main class that injects the module, how do I pass the params to the @Provides method?
public MainClass{
main(){
Injector injector = Guice.createInjector( new ClientModule());
MainClass mainClass = injector.getInstance(MainClass.class);
}
This throws a Null pointer exception param1