Is there a way to move a method from a class A to other B where A does not depends upon B?
Hello,
Suppose:
class A {
private C other;
public void methodA(){
//do stuff
}
...
}
class B {
...
}
I wanna move methodA from A to B, but it seams to be impossible. The only move operation possible is from A to C. Is that true? If so, why?
Thanks in advance,
Vitor
请先登录再写评论。
because it will produce non-valid code?
initial code compiles:
after refactoring:
if method is static then it's ok:
will become
humm, i gess there is no easy way to put the code in a valid state given those conditions...