mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-18 08:50:57 +07:00
27 lines
831 B
Java
27 lines
831 B
Java
|
|
interface Condition<T> {
|
|
boolean value(T t);
|
|
}
|
|
abstract class Test {
|
|
|
|
protected static <Impl extends AbstractCache, T extends OCSymbol> T findNearestTopLevelSymbol(Class<Impl> clazz,
|
|
Condition<? super T> condition) {
|
|
|
|
return null;
|
|
}
|
|
|
|
interface OCSymbol {}
|
|
interface SwiftSymbol extends OCSymbol {}
|
|
|
|
|
|
class AbstractCache<T extends OCSymbol> {}
|
|
class SwiftCache extends AbstractCache<SwiftSymbol> {}
|
|
|
|
private static void foo(final Condition<? super SwiftSymbol> condition) {
|
|
SwiftSymbol s = findNearestTopLevelSymbol(SwiftCache.class, condition);
|
|
}
|
|
private static void foo1(final Condition<? extends SwiftSymbol> condition) {
|
|
SwiftSymbol s = findNearestTopLevelSymbol(SwiftCache.class, condition);
|
|
}
|
|
}
|