Encapsulation does not necessarily means getters and setters. And have more than one aspects:
- Inside structure control.
- Input data validation.
- Outside access control.
Lets consider 'Outside access control'.
While we directly do not know which class calls method, it's hard to limit context of (method) call. It is possible, but amount of work is to big now time.
Any way what solutions do we have?