Chapter 9. Java Refactoring

In this chapter, we will cover:

  • Renaming elements
  • Moving elements
  • Extracting a superclass
  • Extracting an interface
  • Encapsulating fields

Introduction

NetBeans includes a comprehensive set of features for automated refactoring, that will prove very useful to developers.

In this chapter we will create examples that use NetBeans to move, extract, and create classes, methods, and interfaces.

Be warned that many of the refactoring techniques presented in this chapter might break some code. NetBeans, and other IDEs for that matter too, make it easier to revert changes but of course be wary of things going wrong.

With that in mind, let's dig in.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.191.5.166