title: Object extension in java
body: <p>In java if you have an object that requires a generic to extends a particular class, but you want to implement it with an extension of that class is there any way to let java know that you are not actually breaking your own rules? Example code below in the assumption that that made no sense.</p>
  
  <pre><code>public interface WantedInterface extends StaticInterface&lt;WantedObject&gt;
  
  public class WantedObject extends OlderObject
  
  public class OlderObject extends UsefulObject
  
  public interface StaticInterface&lt;T extends UsefulObject&gt;
  </code></pre>
  
  <p>So my question is essentially, is there any way for me to tell my StaticInterface that my WantedObject does in fact extend my UsefulObject even though it is not direct? I would really prefer not to have to rewrite my WantedObject as a pure extension of a UsefulObject just because the OlderObject contains a lot of useful code and I am writing to a database where the sequence I am using would want to have knowledge of the current state of OlderObject. I realized in writing this that I could just have WantedInterface directly extend the interface for OlderObject, but I want to know if there is a way to avoid this.</p>
  
  <p>EDIT:
  Okay so, in a very weird twist of things I was able to fix the problem by changing the extension of WantedObject to UsefulObject, and then changing it back as it was. Perhaps the problem was just some temporary IDE thing? I'm using eclipse, does it have problems with this by chance?</p>