Add no_default_methods attribute and the associated lint

Fix #14220.