Chapter 4. Gen-A-Refactoring

Several refactorings have the form “Verb Noun.”

Consider these verbsExtract, Inline; Move; Rename; Pull Up, Push Down; Hide, Expose.

Consider these nounsField, Method; Class, Interface, Subclass, Superclass; Hierarchy.

Interlude I4.1 Verbs and Nouns.

In the table below, put a dash (—) in combinations that don't make sense, a plus sign (+) in those that are in Fowler's Refactoring catalog, and an asterisk (*) in those that make sense but aren't in the catalog.

 

Extract

Inline

Move

Rename

Pull Up

Push Down

Hide

Expose

Field

        

Method

        

Class

        

Interface

        

Subclass

        

Superclass

        

Hierarchy

        

▪ See Appendix A for solution.

Get Refactoring Workbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.