Java – how do you share a low-level utility class between packages without exposing it to a public API?
•
Java
I have a library project. I want to restrict the public API, but I also have some low-level utility classes that are shared among some packages I need these utility classes to be publicly accessible, but I don't want to expose them in the public API of the library
I'd like to reflect, but this app looks a little messy
Any help will be greatly appreciated
Solution
Do not include these classes in the API documentation or record them with bold warnings: these classes are for internal use only and may be changed or deleted in future API versions Don't use it
Put these classes on COM foo. bar. The internal package is also useful
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码