Protected

Protected.member
marks a member in a class that may be used only below the current class level.
  • The builtin behavior of Protected is not affected.
This loads the package.
In[1]:=
Click for copyable input
The next class defines a protected class member.
In[2]:=
Click for copyable input
This member may not be used by something outside the class hierarchy (which consists here only of base and Object).
In[3]:=
Click for copyable input
Out[3]=
A child class may use the method.
In[4]:=
Click for copyable input
In[5]:=
Click for copyable input
Out[5]=
The same or a broader accessibility is allowed.
In[7]:=
Click for copyable input
In[8]:=
Click for copyable input