org.greenrobot.eventbus.Subscribe.<init>()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(2.8k)|赞(0)|评价(0)|浏览(126)

本文整理了Java中org.greenrobot.eventbus.Subscribe.<init>()方法的一些代码示例,展示了Subscribe.<init>()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Subscribe.<init>()方法的具体详情如下:
包路径:org.greenrobot.eventbus.Subscribe
类名称:Subscribe
方法名:<init>

Subscribe.<init>介绍

暂无

代码示例

代码示例来源:origin: greenrobot/EventBus

@Subscribe
public void onEvent(Integer event) {
  lastIntEvent = event;
  countIntEvent++;
}

代码示例来源:origin: greenrobot/EventBus

@Subscribe(sticky = true)
  public void onEvent(MyEventInterfaceExtended event) {
    countMyEventInterfaceExtended++;
  }
}

代码示例来源:origin: greenrobot/EventBus

@Subscribe(sticky = true)
  public void onEvent(MyEventInterfaceExtended event) {
    countMyEventInterfaceExtended++;
  }
}

代码示例来源:origin: greenrobot/EventBus

@Subscribe
  public void onEvent(Object event) {
    throw new RuntimeException();
  }
}

代码示例来源:origin: greenrobot/EventBus

@Subscribe
  public void onEvent(NoSubscriberEvent event) {
    throw new RuntimeException("I'm bad");
  }
}

代码示例来源:origin: greenrobot/EventBus

@Subscribe
public void onEvent(String event) {
  lastStringEvent = event;
  countStringEvent++;
}

代码示例来源:origin: greenrobot/EventBus

@Subscribe
  public void onGenericEvent(GenericEvent<T> event) {
    trackEvent(event);
  }
}

代码示例来源:origin: greenrobot/EventBus

@Subscribe
public void onEvent(Object event) {
  countObjectEvent.incrementAndGet();
  trackEvent(event);
}

代码示例来源:origin: greenrobot/EventBus

@Subscribe
  public void onEvent(String event) {
    trackEvent(event);
  }
};

代码示例来源:origin: greenrobot/EventBus

@Override
@Subscribe
public void onEvent(String event) {
  trackEvent(event);
}

代码示例来源:origin: greenrobot/EventBus

@Subscribe
  public void onGenericEvent(T event) {
    trackEvent(event);
  }
}

代码示例来源:origin: greenrobot/EventBus

@Subscribe(threadMode = ThreadMode.MAIN)
public void onEventMainThread(Integer event) {
  lastIntegerEvent = event;
  countIntegerEvent.incrementAndGet();
  trackEvent(event);
}

代码示例来源:origin: greenrobot/EventBus

@Subscribe
  public void onEvent(PrivateEvent any) {
    trackEvent(any);
  }
}

代码示例来源:origin: greenrobot/EventBus

@Subscribe
  public void onEvent(Object any) {
    trackEvent(any);
  }
}

代码示例来源:origin: greenrobot/EventBus

@Subscribe
  public void onEvent(PrivateEvent any) {
    trackEvent(any);
  }
}

代码示例来源:origin: greenrobot/EventBus

@Subscribe(threadMode = ThreadMode.BACKGROUND)
public void onEventBackgroundThread(String event) {
  lastStringEvent = event;
  countStringEvent.incrementAndGet();
  trackEvent(event);
}

代码示例来源:origin: greenrobot/EventBus

@Subscribe
  public void onEvent(Object any) {
    trackEvent(any);
  }
}

代码示例来源:origin: greenrobot/EventBus

@Subscribe
  public void onEvent(String event) {
    trackEvent(event);
  }
};

代码示例来源:origin: greenrobot/EventBus

@Subscribe
  public void onEvent(String event) {
    try {
      eventBus.cancelEventDelivery(this);
    } catch (EventBusException e) {
      failed = e;
    }
  }
}

代码示例来源:origin: greenrobot/EventBus

@Subscribe(threadMode = ThreadMode.MAIN)
  public void onEventMainThread(String event) {
    try {
      eventBus.cancelEventDelivery(event);
    } catch (EventBusException e) {
      failed = e;
    }
    done.countDown();
  }
}

相关文章