Package Names - impl v internal

At one time, digging into the Java API, I came across both implanted and internal packages. So far, I have never thought about this difference - as with all enterpriseisey applications, I assumed that they simply meant that "the actual implementation is here, you (API user) must really use the interface. Go away."

A little bit of digging around Stack Overflow seems to suggest that in the inner package, at least there may be some security placed around it .

So what is the difference? I do not think this is a matter of taste, because I saw the API with both.

+4
source share
1 answer

The package name does not affect runtime behavior. It is just a matter of taste. Some modular systems, such as OSGi, give you tighter control in the manifest file over what is visible rather than with a top-down module, but all this is clearly done not by naming convention. At least in OSGi circles, "internal" is the established naming convention over "impl". Lexically, it is more general than "impl", so the extension is broadly applicable ... Everything that should not concern the module code.

+2
source

Source: https://habr.com/ru/post/1338510/


All Articles