在 netty 中定义监听器如下:\n例如在 io.netty.util.concurrent.CompleteFuture 类中:
\n@Override\npublic Future<V> addListener(GenericFutureListener<? extends Future<? super V>> listener) {\n if (listener == null) {\n throw new NullPointerException("listener");\n }\n DefaultPromise.notifyListener(executor(), this, listener);\n return this;\n}\nRun Code Online (Sandbox Code Playgroud)\n据我所知\xef\xbc\x9aFuture<? super V> 表示取代 V 的 Class 的集合。所以它是继承树中的集合,因为我们至少有 Future<V> 和 Future<Object> 。假设集合的名称是 C。
\n那么问题来了,什么是?扩展 C 意味着 C 是一个集合?
\n希望有人能启发我!
\n