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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.