title: Method argument extends class implements interface
body: <p>I have the following class and interface:</p>
  
  <pre><code>public class BasicObject{...}
  public interface CodeObject{...}
  </code></pre>
  
  <p>I want to create a method in which the argument needs to be of type BasicObject and implements CodeObject. I tried the following code but it doesn't guarantee clazz to be a class that implements CodeObject.</p>
  
  <pre><code>myMethod(Class&lt;? extends BasicObject&gt; clazz){...}
  </code></pre>
  
  <p>I want to do something like this but it doesn't compile:</p>
  
  <pre><code>myMethod(Class&lt;? extends BasicObject implements CodeObject&gt; clazz){...}
  </code></pre>