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