title: Java generic return generic list of type of parameter
body: <p>I'd like to create the following:</p>
  
  <pre><code>//infer the type from parameter but restrict it to one of
  // Proxy's subtype. return a list of this sub type
  public static List&lt;T&gt; process(&lt;T extends Proxy&gt; proxy)
  {
    return new ArrayList&lt;T&gt;(); //just for example
  }
  </code></pre>
  
  <p>Usage:</p>
  
  <pre><code>List&lt;ConcreteTypeOfProxy&gt; list = process(new ConcreteTypeOfProxy());
  </code></pre>
  
  <p>The above example has compilation issues. I think this should logically be available in java, just not sure what the syntax is</p>