title: Generic with Variable Type Arguments
body: <p>I want to do something like</p>
  
  <pre><code>public interface Foo&lt;R, P...&gt; {
      public R bar(P...) {/*misc*/}
  }
  </code></pre>
  
  <p>to get an array of types to use in my bound implementation. Is this possible in java?</p>
  
  <p>Varargs is designed to let me have any number of arguments of a given class.  </p>
  
  <p>I want to use it (or something similar) to have my method accept several arguments, each of which is a member of a given different class. These classes are defined when the generic is bound.</p>
  
  <p>I aware there are work arounds, but is there a type-safe way to do this?</p>