O'Reilly logo

Borland® JBuilder™ Developer’s Guide by Jeff Swisher, Saleem Siddiqui, Michael Landy

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Rename Refactor

The rename refactor method allows you to rename a package, class, method, field, variable, and property in your project. The rename refactor method is a sophisticated search and replace mechanism. The renaming has to be done based on what is being renamed, its scope, and its visibility.

For example, suppose that you are reviewing the code in Listing 7.1 and notice that the variable to represent an employee’s age is called X. X does not clearly represent its purpose or follow the coding standards. You intend to change the variable from X to nAgeOfEmployee. Because X is used many times throughout this method, your first inclination is to do a search for X and replace it with nAgeOfEmployee.

Listing 7.1. Refactoring a Variable—Concept ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required