17.Java Refactoring (Eclipse)

Source: Internet
Author: User

1. DefinitionImprove code design without changing the behavior of the Code;
2. Benefits1. Improve the design; 2. Make the software easier to understand; 3. can help to find bugs;4. Can improve the development speed;
3. Use3.1 Structure Reconstruction (renamed) Right-key class file, Refactor->rename 3.2 move (move to another package)Refactor->move3.3 Modifying the name of a methodSelect a method right-click,Refactor->change Method Signature, the name of the call is changed.3.4 Place the method in the parent class interfacerefactor->pull up, push to the parent class.3.5 methods put into subclasses go        Refactor->pull Down3.6 Put the method in a different class        refactor->extract Superclass. Extract it into a parent class and take this method into the parent class        refactor->extract Class. Extract a non-relational class inside3.7 To extract a method into a function        refactor->extract Method, can reduce repetition.       

From for notes (Wiz)

17.Java Refactoring (Eclipse)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.