Extract this into a function so that the constructor does not have to call a method (which is problematic if someone overrides it).