title: How to configure providers with custom parameters?
body: <p>My class depends on some services which needs to take few parameters and then make network call, currently I am passing those parameters and then creating those services via a factory injected into my class. I need to inject those services as a dependency instead, I know that I can create providers for them but in most of the examples I see that the providers are often bound to the fixed values like <code>serveraddres</code> etc. but I need to give then values during run time.</p>
  
  <p>Below is my example code:</p>
  
  <pre><code>public SomeClass {
     private final SomeFactory someFactory;
  
     @Inject
     SomeClass(SomeFactory factory) {
        someFactory = factory;
     }
  
     public Foo getFoo(String fooId) {
        FooService fooService = someFactory.getFooService(fooId);
        return fooService.getFoo();
     }
  
  }
  </code></pre>
  
  <p>What I need to do is:</p>
  
  <pre><code>public SomeClass {
     private final FooService fooService;
  
     @Inject
     SomeClass(FooService fooService) {
        this.fooService = fooService;
     }
  
     public Foo getFoo(String fooId) {
        return fooService.getFoo();
     }
  
  }
  </code></pre>
  
  <p><strong>Update 1</strong></p>
  
  <p>Making the use case more clear:</p>
  
  <pre><code>  @Provides
    @RequestScoped
    public SomeService provideSomeService(Dep1 dep1, String code) throws IOException {
      return new SomeService.Builder()
          .withApplicationName("Foo")
          .setCode(code)  
          .build();
    }
  </code></pre>
  
  <p>Here, <code>code</code> can be <code>null</code> by default and when needed I can give some value in it.</p>
  
  <p>Can I somehow pass arguments to the provider before its created?</p>