<p>Do any OO languages have a concept of granular compile-time access-control lists beyond public/private/protected?</p><p>Every so often when doing a class hierarchy design, I find myself in a situation where I want class A to be able to call method X of class B, but X is considered somewhat internal and not part of the public API of B.</p><p>My options are to make X public (implying it's part of the public API) or protected/private and then make A a friend (giving it access to all of the internals of B).</p><p>There's no way to say "expose these 3 methods to this other class, but they're not for public consumption)</p>