Probably a general question, but it is considered a bad practice to have an interface (Service), and an implementation of it (ServiceImpl), but with ServiceImpl containing private utility methods that are not contained in the interface?
Not bad practice at all - I'd expect almost any non-trivial concrete implementation class to contain private methods. The alternative would often be to have much too large method bodies within the class.
Don't forget, no-one outside the class should care at all whether you've got lots of private methods or not. They should only care about your public API (or your package / protected API where relevant).
No not at all, exactly what you should do.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With