Method argument extends class implements interface
<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 need to be of type BasicObject and implements CodeObject. I tried this 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 somethign like this but this code doesn't compile :</p>

<pre><code>myMethod(Class&lt;? extends BasicObject implements CodeObject&gt; clazz){...}
</code></pre>
