principal-ideal-domain
principal-ideal-domain

Reputation: 4266

How to move static method in eclipse to different class

I've got a public static method in class A: A.myMethod(). Now I want to move it to class B. I don't do that by cut and paste because then all calls won't work anymore. So I want to make use of eclipse's refactoring engine. As I read here I go to my method and open the refacotring move dialogue there. It askes me to enter a destiantion type for my method. I'm not sure what to enter there. Can you help me?

Upvotes: 0

Views: 541

Answers (1)

awsome
awsome

Reputation: 2153

Destination Type for method is the class to where you want to move the method.

For you destination type would be Class B. This dialog also has a browse button, in which you can search for B and select it.

If you are not sure what happens, create a test method in Class A and then use the above method to move it to Class B.

Upvotes: 1

Related Questions