i am developing a SDK in java and my issue is hiding certain java classes/packages so that no third party application using this sdk is exposed to these underlining class's

I know that if all class objects in the sdk were all inside one package i can assign default/protected access modifiers to the class i want to hide. However, like lots of java projects, a java project like my sdk consists of different packages that group the relivant java class's appropriately.

This means that if i want to hide/protect a class thats in com.a.b.c, The main root class thats visible to the world located in com.a wont be able to access classes protected in com.a.b.c etc

How can i provide a solution to this instead of just dumping all classes in one large package?

Thanks.