How to load a custom class inherited from existing one?
<p>I'm trying to create an object of a class, using just a name of this class:</p>

<pre><code>public interface Foo {
}
public class Bar implements Foo {
}
[...]
Class&lt;Foo&gt; c = Class.forName("com.XXX.Bar").asSubclass(Foo.class);
Foo foo = c.newInstance();
</code></pre>

<p>Compiler says:</p>

<pre><code>incompatible types found : 
java.lang.Class&lt;capture#47 of ? extends com.XXX.Foo&gt;
required: java.lang.Class&lt;com.XXX.Foo&gt;
</code></pre>

<p>What's wrong here?</p>
