Generic interface with a method that return a list
<p>I have a Generic interface (<code>Pack&lt;A extends PackAnimal&gt;</code>) with one method that returns <code>List&lt;A&gt;</code>. Today I've found that if in a class that implements the interface I forget to speficy the class (<code>class XXX implements PackAnimal</code>) the return type is not checked in compilation time and fail during execution</p>

<pre><code>interface PackAnimal {
}
class Buffalo implements PackAnimal {
}

interface LonelyAnimal {
}
class Puma implements LonelyAnimal {
}

interface Pack&lt;A extends PackAnimal&gt; {
    List&lt;A&gt; getMembers();
}

class PumaPack implements Pack {

    @Override
    public List&lt;Puma&gt; getMembers() {
        return null;
    }
}
</code></pre>

<p>Why is that? How could I force that if there any type of mistake in the declaration the compilation will fail?</p>