mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-18 17:20:54 +07:00
41 lines
727 B
Java
41 lines
727 B
Java
|
|
import java.io.IOException;
|
|
|
|
class Test {
|
|
{
|
|
queryForObject(
|
|
(rs) -> {
|
|
try {
|
|
return readValue(rs);
|
|
} catch (IOException e) {
|
|
return new UserOptions();
|
|
}
|
|
}
|
|
);
|
|
}
|
|
|
|
UserOptions readValue(String content) throws IOException {
|
|
System.out.println(content);
|
|
return null;
|
|
}
|
|
|
|
UserOptions readValue(Integer i) throws IOException {
|
|
System.out.println(i);
|
|
return null;
|
|
}
|
|
|
|
void queryForObject(Mapper rowMapper) {
|
|
System.out.println(rowMapper);
|
|
}
|
|
|
|
void queryForObject(String requiredType) {
|
|
System.out.println(requiredType);
|
|
}
|
|
|
|
interface Mapper {
|
|
UserOptions mapRow(String rs) throws IOException;
|
|
}
|
|
|
|
class UserOptions {}
|
|
|
|
} |