Let's say I have packages:
com.mycomp.packone
com.mycomp.packtwo
Is there any way for me to access protected members of a class in packone from a class in packtwo, but not allow public users to do so? The only way I can think of is with protected access and using a subclass. But that just pushes the problem into the subclass, because I would want the same access restrictions there as well.
The context for this is we are redesigning our main API and want to make it more modular. Right now it is all in one giant package. I wasn't here for that design, but I assume it is because there is a lot of protected usage.