title: Equivalent to Arrays.asList() but for arrays?
body: <p>I'd like a convenience method to take a set of parameters and return an array, much like <code>Arrays.asList(T... items)</code> will take a set of parameters and return a <code>List&lt;T&gt;</code> of those items.</p>
  
  <p>It's easy enough to write one, but does one already exist in java?</p>
  
  <p><strong>UPDATE</strong>
  My bad!  I didn't realize the question was so unclear.  Your questions have forced me to realize that the question isn't quite the question I thought it was.</p>
  
  <p>I have several calls like the following that place various key/values into a Map:</p>
  
  <pre><code>        put( Key.get(A.class), new Key[] { Key.get(X.class), Key.get(Y.class), Key.get(Z.class)});
  </code></pre>
  
  <p>... where the map is of type <code>Map&lt;Key&lt;? extends Foo&gt;,Key&lt;? extends Foo&gt;[]&gt;</code></p>
  
  <p>I was looking for a typesafe and succinct way to execute the above statement, and I <em>thought</em> that something like the following would work:</p>
  
  <pre><code>        put( Key.get(A.class), toArray( Key.get(X.class), Key.get(Y.class), Key.get(Z.class)));
  </code></pre>
  
  <p>... where <code>toArray()</code> is defined as something like</p>
  
  <pre><code>private static &lt;T&gt; T[] toArray( T... t ) {
      return t;
  }
  </code></pre>
  
  <p>However, it turns out that this solution is not typesafe itself, and thus it's really not much more succinct than just creating a new array manually using <code>new</code>.  This was the first cause of my misunderstanding.</p>
  
  <p>I thought that I could get typesafety by using a List instead of an array and then using <code>Arrays.asList()</code> to populate the values of the list, but it turns out that that's not typesafe either.  This was the second cause of my misunderstanding.  I thought that <code>Arrays.asList()</code> would make this statement more succinct than it actually does, and thus I was looking for something that would do the same for me for arrays.</p>
  
  <p><strong>So I suppose the question is really -</strong> Is there a succinct way to get typesafety in the above situation?</p>