Files
openide/java/java-tests/testData/refactoring/extractMethodNew/ClassReference_after.java
Alexandr Suhinin c7b05d5f55 [extract method] fix test data
GitOrigin-RevId: 4d64e2fced6e7b3c87b1361de36909fec8d7db0a
2020-03-31 12:32:01 +00:00

26 lines
390 B
Java

import org.jetbrains.annotations.NotNull;
class C {
Object foo(boolean b) {
if (b) {
return newMethod();
} else {
return B.getInstance();
}
}
@NotNull
private A newMethod() {
return A.getInstance();
}
}
class A {
static A getInstance() {
return new A();
}
}
class B extends A {
static B getInstance() {
return new B();
}
}