Consider also the #1 solution to every problem in software engineering (and also the #1 cause): add more layers. If
Validator
is now holding methods/state that would be really convenient to have available externally, maybe there should be more classes that allow us to duplicate/replicate the handy things that it does without needing to have, or be, an instance of
Validator
, and
those get public interfaces that
Validator
(and any other interested party) can use. In other words, extract useful stuff to other classes and make
Validator
more of a facade. —
Jeroen Mostert 35 secs ago