title: Enum.valueOf(Class<T> enumType, String name) question
body: <p>I am trying to get around a compile error ("Bound mismatch: ...") relating to dynamic enum lookup.</p>
  
  <p>Basically I want to achieve something like this:</p>
  
  <pre><code>String enumName = whatever.getEnumName();
  Class&lt;? extends Enum&lt;?&gt;&gt; enumClass = whatever.getEnumClass();
  Enum&lt;?&gt; enumValue = Enum.valueOf(enumClass, enumName);
  </code></pre>
  
  <p>Whatever I do, I always end up with that compile error. Honestly, generics and enums are quite mindboggling to me...</p>
  
  <p>What am I doing wrong here?</p>