Use the Extract Method refactoring operation to change a code fragment into a method whose name describes the purpose of the method. The Extract Method feature analyzes any highlighted code. If that code is not extractable to a method, the refactoring engine warns you. If the method can be refactored, the refactoring engine creates a new method outside of the current method. The refactoring engine then determines any parameters, generates local variables, determines the return type, and prompts the user for a new name. The refactoring engine inserts a method call to the new method in the location of the old method.
There are certain limitations to the extract method refactoring. They include:
Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
|
What do you think about this topic? Send feedback!
|