tag:blogger.com,1999:blog-34692233.post8003745800238362749..comments2023-05-09T12:02:11.783+01:00Comments on Mind the Gap: Default export granularityGlynhttp://www.blogger.com/profile/08741529390385812080noreply@blogger.comBlogger4125tag:blogger.com,1999:blog-34692233.post-39458140647200057012007-06-21T13:58:00.000+01:002007-06-21T13:58:00.000+01:00Distinct modules can certainly export arbitrary se...Distinct modules can certainly export arbitrary sets of classes sharing a common package name and these sets could overlap. This is true in JSR 277 and JSR 291.<BR/><BR/>A so-called 'split' package occurs when two or more such sets of classes are imported by another module. JSR prohibits split packages whereas JSR 291 accommodates them (but only via require-bundle - never via import-package).<BR/><BR/>Since each module has its own class loader, two classes sharing a common package name but belonging to distinct modules do not belong to the same runtime package. In particular, they couldn't access each other's package private members.<BR/><BR/>For this and other reasons split packages need handling with some care. The main reason to support split packages in JSR 291 was the requirement to be able to refactor large 'legacy' packages comprising two or more relatively independent pieces but without impacting code using the packages.Glynhttps://www.blogger.com/profile/08741529390385812080noreply@blogger.comtag:blogger.com,1999:blog-34692233.post-6886523497479076062007-06-21T06:23:00.000+01:002007-06-21T06:23:00.000+01:00thanks, that's much clearerbtw, is it possible for...thanks, that's much clearer<BR/><BR/>btw, is it possible for different modules to export a different (but potentially overlapping) set of classes from the same package?mccullshttps://www.blogger.com/profile/04261077211575061061noreply@blogger.comtag:blogger.com,1999:blog-34692233.post-15845385877034258862007-06-20T17:13:00.000+01:002007-06-20T17:13:00.000+01:00Using 'include' and 'exclude' directives, e.g.Expo...Using 'include' and 'exclude' directives, e.g.<BR/><BR/>Export-Package: org.foo.p; exclude:="*Impl"Glynhttps://www.blogger.com/profile/08741529390385812080noreply@blogger.comtag:blogger.com,1999:blog-34692233.post-76112908397155317442007-06-20T16:36:00.000+01:002007-06-20T16:36:00.000+01:00I'm curious ... how does one filter out classes fr...I'm curious ... how does one filter out classes from an export package?AlBluehttps://www.blogger.com/profile/06362201865553416948noreply@blogger.com