mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-13 14:36:58 +07:00
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();
|
|
}
|
|
} |