title: Can a Java interface in another package be refactored from my code?
body: <p>I'm using an (open-source) API in my Java project and referencing interfaces from it. One interface (<code>Foo</code>) is used extensively both in the API and in projects that use it. For my project, I'd like to use an interface which only exposes a subset of the methods that <code>Foo</code> does, such that <code>Foo</code> would inherit methods from my new interface (<code>Bar</code>). I don't want to change the interface of <code>Foo</code> at all; rather, I'd like to be able to write classes which implement <code>Bar</code>, and then manipulate those along with classes which implement <code>Foo</code> as if they are all <code>Bar</code>.</p>
  
  <p>Since the API is in a different package, is there any way to accomplish this such that <code>Bar</code> is a superclass (interface) of all <code>Foo</code>?</p>