ClassAccessAllowedQ

ClassAccessAllowedQ[class, calling, accessibility]
returns True, if the class calling may access a member of class with the given accessibility.
This loads the package.
In[1]:=
Click for copyable input
In the next example, an "outside" call is simulated by assuming that Object called a class member. As expected, only the public member of base may be used.
In[2]:=
Click for copyable input
In[3]:=
Click for copyable input
Out[3]=
Out[3]=
Out[3]=
In[4]:=
Click for copyable input
In[5]:=
Click for copyable input
Out[5]=
Out[5]=
Out[5]=