5

Refactoring Techniques

We’re now getting into the meat of the subject: how to do refactoring. It would be a bit silly to think we can cram all the refactoring techniques ever known into one chapter. So, we’ve decided to focus on the most common and more interesting ones. Our main source of wisdom comes from Martin Fowler’s fantastic work in his book, Refactoring: Improving the Design of Existing Code. He teamed up with Kent Beck to explain, step by step, how to do refactoring, from the simplest to the trickiest cases. For each one, they provide a kind of how-to guide so that you won’t mess things up. Here, we’re offering a selection of the most important refactoring techniques, an importance that we consider based largely on our own experience. ...

Get Refactoring in Java 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.