title: GenericType not working with templates in Java
body: <p>My code looks like this.</p>
  
  <pre><code>public &lt;T&gt; T performTask(){
      // something 
      GenericType type = new GenericType&lt;T&gt;(){};
  }
  </code></pre>
  
  <p>This gives an error: java.lang.IllegalArgumentException: javax.ws.rs.core.GenericType does not specify the type parameter T of GenericType 
  Can someone suggest a way to step past this error? I need to use <strong>type</strong> as parameter in another utility.</p>