title: How to declare a method parameter as any enum
body: <p>I have a method on which I need to pass an enum as a parameter. </p>
  
  <pre><code>public &lt;T&gt; T doSomething(SomeEnum operation, Class&lt;T&gt; something);
  </code></pre>
  
  <p>I have several enums and <strong>the method is a common one which should work with any enums</strong>. What is the correct way to write this method signature to accept any generic enum types? I know that I can use a marker interface to this purpose, but I would like to write it with generic enum signatures. Please advise me on this. </p>
  
  <p>Whats the bad idea with the below one: (It works but I get warnings from IDE saying it is a raw type. I'm not clear about the reason).</p>
  
  <pre><code> public void doSomething(Enum operation);
  </code></pre>