if that's "textbook java oop" with runtime polymorphism then that should definitely be avoided and is pretty much considered an anti-pattern nowadays