[refactoring] Add deprecation method.