Chapter 4. Make It Better – Refactoring

In this chapter, we will take a look at source code refactoring in IntelliJ IDEA. Refactoring is the process of restructuring your source code base without changing its behavior. It enhances code readability and reduces its complexity. When the internal code structure improves, the code becomes easier to maintain and extend. Refactoring is important not only during everyday work on your own code, but for legacy code as well. The refactoring patterns are catalogued by Martin Fowler at www.refactoring.com. This is a great resource—the catalogue contains a detailed description of each refactoring along with the corresponding code example. We will focus on how IntelliJ IDEA helps with executing these refactoring ...

Get IntelliJ IDEA Essentials 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.