title: Inject an array of Objects in Guice
body: <p>I would like to achieve something similar to the following in Guice:</p>
  
  <pre><code>public MyClass {
  
      private final InjectedObject[] injectedObjects;
  
      @Inject
      public MyClass(InjectedObject[] injectedObjects) {
          this.injectedObjects=injectedObjects;
      }
  }
  </code></pre>
  
  <p>ie I would like to be able to create a certain number of instances of an object, and inject them into another object as an array. I could probably do this instead:</p>
  
  <pre><code>public MyClass {
  
      private final InjectedObject[] injectedObjects;
  
      @Inject
      public MyClass(InjectedObjectProvider injectedObjectProvider) {
          this.injectedObjects=injectedObjectProvider.getArrayOfInjectedObjects(5);
      }
  }
  </code></pre>
  
  <p>...but I was wondering if there was another route that was more elegant?</p>