Override method so that a parameter requires a subclass
<p>I have an abstract super class and 2 classes that extend it</p>

<pre><code>public abstract class MyAbstract {}

public class A extends MyAbstract {}

public class B extends MyAbstract {}
</code></pre>

<p>I have an interface which has a method that takes a subclass of MyAbstract as its parameter</p>

<pre><code>public interface MyInterface {
    &lt;T extends MyAbstract&gt; void someMethod(T param);
}
</code></pre>

<p>I then have a class that implements that interface</p>

<pre><code>public class AnotherClass implements MyInterface {
    @Override
    &lt;T extends MyAbstract&gt; void someMethod(T param) {}
}
</code></pre>

<p>But I only want to allow a specific subclass of <code>MyAbstract</code> to be used in the method.</p>

<p>Here are a couple of the things I tried so far:</p>

<pre><code>&lt;T extends A&gt; void someMethod(T param); //doesn't override the method

void someMethod(A param); //doesn't override the method
</code></pre>

<p>Is there anyway to have a interface take a generic parameter and the implementer of that interface specify a more restricted version of that parameter or is this simply not possible?</p>