The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

Bujji (2) [Avatar] Offline
#1
Hi,
When I was going through chapter 1 saw the statement "But in
real-world applications class-level visibility when combined with packaging turns out to be a
very crude tool for ensuring API coherency" under Low-Level code visibility section.Can you elaborate with an example as I believe the statement has lot of meaning.
richard.hall (87) [Avatar] Offline
#2
Re: please quote an example
At this point, that chapter has gone into final production, so I am not sure how much changing we'll be able to do. The whole point of that Java access modifiers are really intended for object-oriented encapsulation, not logical system partitioning. While packages do provide some support for logical partitioning of systems, they are two simplistic since they only offer "private to everyone" or "public to everyone" visibility control. OSGi bundles provide a third level of visibility control, which is "public to everyone in the same module".