Yes, this method is meant to be invoked also in the code and not only when an event is fired.