title: Guice inject based on annotation value
body: <p>I would like to use goolge/guice inject a value based on a class i provide with the annotation.</p>
  
  <p>AutoConfig annotation</p>
  
  <pre><code>@BindingAnnotation
  @Retention(RetentionPolicy.RUNTIME)
  @Target({ ElementType.PARAMETER, ElementType.FIELD })
  public @interface AutoConfig {
      // default null not possible
      Class&lt;? extends Provider&lt;? extends ConfigLoader&lt;?&gt;&gt;&gt; provider() default XMLAutoConfigProvider.class;
  }
  </code></pre>
  
  <p>This is my annotation which allows configuring the type of config, that should be used for the annotated fields.</p>
  
  <p>Usecase:</p>
  
  <pre><code>@AutoConfig()
  ConfigLoader&lt;?&gt; defaultConfig;
  
  @AutoConfig(provider = JsonConfigProvider)
  ConfigLoader&lt;?&gt; jsonConfig;
  </code></pre>
  
  <p>I want to have two configs, one default/xml one and a json one. They will probably never occur in the same class at the same time. But i don't know when the one or the other is used. I used the approach with a class because they are provided by some dependencies/libs and this annotation will be used for some (plugable) submodules.</p>
  
  <p>MyGuiceModule</p>
  
  <pre><code>public class MyGuiceModule extends AbstractModule {
      @Override
      protected void configure() {
          bind(new TypeLiteral&lt;ConfigLoader&lt;?&gt;&gt;() {})
              .annotatedWith(AutoConfig.class)
              .toProvider(autoConfig.provider());
      }
  }
  </code></pre>
  
  <p>This the critical part, i just cannot imagine how to implement it.</p>
  
  <p>So basically i just want to use the provider class specified in the annotation.
  Its not necessary to use the provider class here too. Because autoConfig.provider().newInstance() is basically all i need. (I need to use a setter on the new instance but thats all i want to do at this place)</p>
  
  <p>To sum it up all i really want to do is push the annotation (or its values to the provider) either using the get(AutoConfig autoConfig) or in the constructor. 
  Currently i only use the constructor to inject the configFile value i want to set on the newly generated config instance.</p>