Alejandro Vilar <[email protected]> wrote:
public class Adapters{
public static class ComponentListenerAdapter implements
ComponentListener{
//...empty implementations
}
}
Then you would need one Adapters class for each package. I like the
way Pivot does it better, because I see that an adapter is available
immediately by looking at the interface.
package other;
import example.AbstractAdapter;
public class Adapter extends AbstractAdapter {
public void bar() {
System.out.println("Subclass implementation");
}
public static void main(String[] args) {
Adapter adapter=new Adapter();
adapter.bar();
}
}
Contrived. Why would you name your sub-sub-class exactly the same as
the Adapter class itself? Usually subclasses get a different name to
signalize their special behaviour.
Dirk.