Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories


    public final i a(final rx.c.b<? super T> bVar, final rx.c.b<Throwable> bVar2) {
        if (bVar == null) {
            throw new IllegalArgumentException("onNext can not be null");
        } else if (bVar2 != null) {
            return b((h<? super T>) new h<T>() {
                public final void onCompleted() {
                }

                public final void onError(Throwable th) {
                    bVar2.call(th);
                }

                public final void onNext(T t) {
                    bVar.call(t);
                }
            });
        } else {
            throw new IllegalArgumentException("onError can not be null");
        }
 

final rx.c.b<? super T> bVar

1.这个泛型rx.c.b<? super T> b后面的用尖括号 表示这个类型是b 下面的? 然后 super T 是这个子类?
2.bVar.call(t)
这里有个call()方法,但是我全局搜索都没找到call 的实例化的地方


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
302 views
Welcome To Ask or Share your Answers For Others

1 Answer

  1. rx.c.b<? super T>: rx.c.b这是个接口或者类,而后面<? super T>定义的是类属性或者方法使用的具体对象。bVarrx.c.b的实例。
  2. bVar.call(t): 全局搜索不到call(t)方法是因为这是留给你具体去实现的回调函数,这也是java通用的实现回调函数的做法。

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...