Bug #182
Public API should be cleaned up
| Status: | In progress | Start: | 12/21/2009 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assigned to: | % Done: | 0% |
||
| Category: | Core DAO | Spent time: | 1.00 hour | |
| Target version: | 2.0 RC3 | Estimated time: | 2.00 hours |
Description
It is not clear which classes are intended for use by the end user of the Hades library, and which are internal implementation. For example, when you open class HadesQuery in NetBeans, NetBeans will warn you that both methods in this interface are "exporting non-public type through public API". This is because class ParameterBinder is package private, and HadesQuery is public - this means that no class outside of the org.synyx.hades.dao.query will be able to use HadesQuery anyway, even though HadesQuery is public.
I think it would be useful to make as many classes as possible package private, and also move the implementation classes to a package which as "impl" in its name, e.g. org.synyx.hades.impl.dao.query. This will make it easier for end users to understand the API.
Associated revisions
- reduced visibility of classes for
configandquerypackage - references #182
- reduced visibility of classes for
configandquerypackage * references #182
History
Updated by Oliver Gierke 5 months ago
- Category set to Core DAO
- Status changed from New to In progress
- Assigned to set to Oliver Gierke
- Target version set to 2.0.0 RC2
- Estimated time set to 2.00
Updated by Oliver Gierke 5 months ago
Thanks for pointing this out, Petr. Indeed, not all types were visible as defensive as they could have been. I've just updated HadesQuery and some other types in dao.config and dao.query to be more non-visible. The only type that really needs to be accessible from the query package from a user's point of view is QueryLookupStrategy. The package is implementation in any further regard. For 2.0 there' probably will be some restructuring in the package structure.
So some of the issues you mentioned are already fixed in the latest snapshot deployment (should be accessible via the maven repositories) but the general overhaul will be done for 2.0.
Updated by Oliver Gierke 5 months ago
- File mylyn-context.zip added
Updated by Oliver Gierke 2 months ago
- Target version changed from 2.0.0 RC2 to 2.0 RC3