Refactoring Methods
Refactoring List Composing Methods Properly Extract Method Turn the fragment into a method whose name explains the purpose of the method Benefit is that original method become shorter and easier to comprehend Inline Method A method's body is just as clear as its name Put the method's body into the body of its callers and remove the method Inline Temp You have a temp that is assigned to once with a simple expression and the temp is getting in the way of other refactorings Replace all references to that temp with the expression Replace Temp with Query You are using a temporary variable to hold the result of an expression Extract the expression into a method. Replace all references to the temp with the expression. The new method can then be used in other methods By replaceing the temp with a query method, any method in the class can get the information cleanly Introduce Explaining Variable Put the result of the complicated expression, or parts of the