| Extract methods across classes? [message #335673] |
Mon, 20 April 2009 16:42  |
Al Mising name Messages: 123 Registered: July 2009 |
Senior Member |
|
|
If I have something like this:
public void myMethod() {
System.out.println("Hello);
int y = 1;
for (int i = 0; i <= 99; i++) {
System.out.println("i = " + i);
}
y++;
for (int i = 0; i <= 99; i++) {
System.out.println("i = " + i);
}
}
and I highlight the first for loop and command it to extract into a
method, it will recognize that the 2nd for loop is the same and replace it
with a call to the new method, in addition of a call at the place of the
first for loop.
My question is, can it do this across methods? across classes?
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02384 seconds