mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-02 00:35:33 +07:00
GitOrigin-RevId: f2ea406a5cf229cf9e63b6c2b53b9d86f245a6d9
20 lines
370 B
Plaintext
20 lines
370 B
Plaintext
public class InlineSingleImplementation {
|
|
interface MyIface {
|
|
void mySimpleMethod();
|
|
}
|
|
|
|
static class MyIfaceImpl implements MyIface {
|
|
@Override
|
|
public void mySimpleMethod() {
|
|
extracted();
|
|
}
|
|
|
|
private void extracted() {
|
|
System.out.println("Impl");
|
|
}
|
|
}
|
|
|
|
void test(MyIface iface) {
|
|
((MyIfaceImpl) iface).extracted();
|
|
}
|
|
} |