title: How to bind with provider which uses annotation value in Guice?
body: <p>Is there any way to bind with provider which interprets target's annotation value in Google Guice?</p>
  
  <p>Example:</p>
  
  <pre><code>bind(Resource.class)
      .annotatedWith(MyAnnotation.class)
      .toProvider(new MyProvider&lt;MyAnnotation, Resource&gt;{
          public Resource get(MyAnnotation anno){
              return resolveResourceByAnnoValue(anno.value());
          }
      });
  </code></pre>
  
  <p>I want to initialize field of an Android Activity class by annotated binding.
  It should have to take multiple resources by it's unique Id. </p>
  
  <p>Original Way:</p>
  
  <pre><code>public class TestActivity extends Activity{
      private TextView textView;
      private Button testButton;
  
      public void onAfterCreate(...){
          // set UI declaration resource.
          setContentView(R.layout.activity_test);
  
          // initialize fields, it must be done after setting ui definition.
          textView = (TextView) findViewById(R.id.textView);
  
          .... initialize other fields, hook them...
  
      ...
  }
  </code></pre>
  
  <p>I want to bind UI and it's field in declarative way, not pragmatically likes above:</p>
  
  <pre><code>@ResourceID(R.layout.activity_test)
  public class TestActivity extends InjectiveActivity{
      @ResourceID(R.id.textView) // Auto generated static resource id constant
      private TextView textView;
  
      @ResourceID(R.id.testButton)
      private Button testButton;
  
      ...
  }
  </code></pre>