title: Is it possible to solve the "A generic array of T is created for a varargs parameter" compiler warning?
body: <p>This is a simplified version of the code in question, one generic class uses another class with generic type parameters and needs to pass one of the generic types to a method with varargs parameters:</p>
  
  <pre><code>class Assembler&lt;X, Y&gt; {
      void assemble(X container, Y... args) { ... }
  }
  
  class Component&lt;T&gt; {
      void useAssembler(T something) {
  
          Assembler&lt;String, T&gt; assembler = new Assembler&lt;String, T&gt;();
  
          //generates warning:
          // Type safety : A generic array of T is
          // created for a varargs parameter
          assembler.assemble("hello", something);
      }
  </code></pre>
  
  <p>}</p>
  
  <p>Is there any correct way to pass along the generic parameter to a varargs method without encountering this warning?</p>
  
  <p>Of course something like </p>
  
  <pre><code>assembler.assemble("hello", new T[] { something });
  </code></pre>
  
  <p>does not work since you cannot create generic arrays.</p>