Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [e4-dev] Proposals

>   Class PrimaryObjectSupplier provides no functionality, and the name
>   is clumsy. I cannot see why there needs to be an abstract class instead of
>   an interface.


If clients are supposed to implement a framework interface, it is almost always better to let them extend an abstract class instead, because otherwise you'll have a really hard time evolving the API over time. It is impossible to add methods to an interface that clients are supposed to implement. In some cases, we have both (interface and abstract class) and corresponding JavaDoc that tells clients to extend the class rather than implementing the interface. Some of these cases can be simplified by removing the interface - so we might get rid of the interface IObjectSupplier (but don't take my word for it, I haven't looked at the code). I don't think we should get rid of the class.

Boris


Back to the top