A class does not do much.Move all features of this class to another class, and then remove the original class..
Motivation: The Inline class is the opposite of the extract class. If a class no longer bears sufficient responsibilities and has no reason to exist independently (this is usually because the previous refactoring action removes the responsibility of this class ), select the most frequent user (also a class) of this "shrinking class", and insert the "shrinking class" into another class by using the inline class method.
Practice: 1. Declare the public protocol of the source class on the target class and delegate all functions to the source class. If "using an independent interface to represent source class functions" is more appropriate, you should first use extract interface (extract Interface) before inline)
2Modify all source class reference points and reference the target class. Declare the source class as private to cut off all references outside the package. Modify the name of the source class at the same time, which enables the compiler to help you capture all hidden reference points of the source class.
3, Compilation, and testing.
4Use the move method and move field to move all features of the source class to the target class.
5, Delete the source class.