I'd like my class to have a method that can only be called by itself or by its subclasses.
The closest thing is protected
access, but it also allows other classes in the same package to call the method, which I don't want.
Is there a way to achieve this, or should I consider some sort of package refactoring instead?
It seems to me like private
won't let subclasses use the method.