Not sure what to put in the title for this... so tried to make it as broad as possible
Generally with visibility modifiers, we can expose interfaces to the public or keep internal interfaces to the module. I've come across a scenario where a project will have multiple modules. However, there needs to be inter-module communcation which is out of scope for internal visibility, but I don't want the inter-module communication interfaces accessible outside of the project (ie another project implementing my project). I feel like this question should have arisen for someone out there.
I tried to look into annotations(but fairly unfamiliar territory on creating custom annotations) to see if I could simulate this behavior by some hackish approach, but no luck so far.
Any suggestions on this?