org.greenrobot.eventbus.Subscribe类的使用及代码示例

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

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

Subscribe介绍

暂无

代码示例

代码示例来源: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

@SuppressWarnings("unused")
  @Subscribe
  public void onEvent(String dummy) {
  }
}

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

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

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

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

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

@Subscribe
public void onEvent(MyEvent event) {
  countMyEvent++;
}

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

@Subscribe
public void onEvent(MyEventInterface event) {
  countMyEventInterface++;
}

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

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

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

@Subscribe
public void onEvent(MyEvent event) {
  countMyEvent++;
}

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

@Subscribe
public void onEvent(MyEventExtended event) {
  countMyEventExtended++;
}

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

@Subscribe(sticky = true)
public void onEvent(MyEventInterface event) {
  countMyEventInterface++;
}

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

@Subscribe(sticky = true)
public void onEvent(MyEvent event) {
  countMyEvent++;
}

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

@Subscribe
public void onEvent(MyEventInterface event) {
  countMyEventInterface++;
}

代码示例来源: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(SubscriberExceptionEvent event) {
    throw new RuntimeException("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);
}

相关文章