mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-01 09:04:15 +07:00
GitOrigin-RevId: 9ee1fddcd636a1f8a75d11011d1d1f8b75c93d7a
9 lines
198 B
Java
9 lines
198 B
Java
import org.jetbrains.annotations.Contract;
|
|
|
|
class Foo {
|
|
@Contract("_, null -> fail")
|
|
static <T, R extends T> boolean canCast(T inst, Class<R> toType) {
|
|
return toType.isInstance(inst);
|
|
}
|
|
}
|