Protected access (source code)

= Protected access

Protected access permits designated subclass code to use a member while excluding ordinary clients. The precise receiver and scope restrictions depend on the language; it should not be confused with public access to every instance's representation. Access control helps protect <representation invariants> but does not ensure that authorized subclass code maintains them.