Exported vs non-exported determined by looking at the packages and deciding if end users need to be able to compile against them. Stephen
On 26 July 2016 at 11:48, Alessio Stalla <alessiosta...@gmail.com> wrote: > Just curious - how did you identify exported and non-exported packages? Are > you speaking about your design intentions or are you looking at actual use > of the libraries in wild? > > On 26 July 2016 at 12:10, Stephen Colebourne <scolebou...@joda.org> wrote: >> >> There has been a lot of discussion about exporting packages - at >> compile time vs runtime and also the related problem of resources. I >> decided to take a look at some open source projects to see whether a >> list of exported packages is useful as currently defined: >> >> These standard open source projects were designed prior to modules: >> >> Joda-Time - 7 exported packages >> Joda-Time-Hibernate - 1 exported package >> Joda-Time-I18N - 1 exported package >> Joda-Time-JspTags - 1 exported package >> Joda-Money - 2 exported packages >> Joda-Primitives - 10 exported packages >> Joda-Convert - 2 exported packages >> Joda-Collect - 1 exported package >> Joda-Beans - 16 exported packages >> Joda-Beans-Maven-Plugin - 1 exported package >> Joda-Beans-UI - 5 exported packages >> ThreeTen-Extra - 3 exported packages >> ThreeTen-Backport - 6 exported packages >> Google Guava - 18 exported packages, 1 non-exported package >> SLF4J - 3 exported packages >> JCommander - 4 exported packages, 1 non-exported package >> >> Looking at the list, it is clear that non-exported packages are a >> small use-case. >> - 81 exported packages >> - 2 non-exported packages >> >> Strata [1] has been designed in Java 8 but with an awareness that >> modules are coming: >> >> Strata-Collect - 8 exported packages >> Strata-Basics - 7 exported packages >> Strata-Data - 2 exported packages >> Strata-Calc - 3 exported packages >> Strata-Product - 23 exported packages >> Strata-Market - 13 exported packages >> Strata-Loader - 3 exported packages, 1 only exported at runtime for >> reflection >> Strata-Math - 1 exported package, 17 packages exported only to a >> single friend module >> Strata-Pricer - 19 exported packages, 10 non-exported packages >> Strata-Measure - 15 exported packages >> >> - 94 exported packages >> - 17 exported to a single other module >> - 11 non-exported packages >> >> I'll use a different thread to express my opinion on what the data >> means. Please use this thread to add summaries of other open source >> projects. >> >> Stephen >> >> [1] https://github.com/OpenGamma/Strata > >