mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-18 17:20:54 +07:00
20 lines
416 B
Java
20 lines
416 B
Java
class Test {
|
|
{
|
|
bar(new ThrowableComputable<String, Exception>() {
|
|
@Override
|
|
public String compute() throws Exception {
|
|
return foo();
|
|
}
|
|
});
|
|
}
|
|
|
|
private <T> void bar(ThrowableComputable<T, Exception> throwableComputable) {}
|
|
|
|
private <K> K foo() throws Exception {
|
|
return null;
|
|
}
|
|
|
|
interface ThrowableComputable<T, T1 extends Throwable> {
|
|
T compute() throws T1;
|
|
}
|
|
} |