本文整理了Java中com.google.common.eventbus.Subscribe.<init>()
方法的一些代码示例,展示了Subscribe.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Subscribe.<init>()
方法的具体详情如下:
包路径:com.google.common.eventbus.Subscribe
类名称:Subscribe
方法名:<init>
暂无
代码示例来源:origin: google/guava
@Subscribe
public void throwExceptionOn(String message) {
throw exception;
}
};
代码示例来源:origin: google/guava
@Subscribe
@Override
public void differentlyOverriddenAnnotatedInSubclass(Object o) {
differentlyOverriddenAnnotatedInSubclassGoodEvents.add(o);
}
}
代码示例来源:origin: google/guava
@Subscribe
@Override
public void declaredIn2AnnotatedInClass(Object o) {
declaredIn2AnnotatedInClassEvents.add(o);
}
代码示例来源:origin: google/guava
@Subscribe
public void throwExceptionOn(String message) {
throw new RuntimeException();
}
};
代码示例来源:origin: google/guava
@Subscribe
public void differentlyOverriddenNotAnnotatedInSubclass(Object o) {
// the subclass overrides this and does *not* call super.dONAIS(o)
differentlyOverriddenNotAnnotatedInSubclassBadEvents.add(o);
}
代码示例来源:origin: google/guava
@SuppressWarnings("unused")
@Subscribe
public void eat(Comparable<?> food) {
compEvents.add(food);
}
};
代码示例来源:origin: google/guava
@Subscribe
public void listenForStrings(String event) {
bus.post(SECOND);
}
}
代码示例来源:origin: google/guava
@Subscribe
public void listenForEverything(Object event) {
eventsReceived.add(event);
}
}
代码示例来源:origin: google/guava
@Subscribe
@Override
public void overriddenAndAnnotatedInSubclass(Object o) {
overriddenAndAnnotatedInSubclassEvents.add(o);
}
代码示例来源:origin: google/guava
@Subscribe
@Override
public void annotatedIn1And2AndClass(Object o) {
annotatedIn1And2AndClassEvents.add(o);
}
代码示例来源:origin: google/guava
@SuppressWarnings("unused")
@Subscribe
public void eat(Object food) {
objectEvents.add(food);
}
};
代码示例来源:origin: google/guava
@Subscribe
@Override
public void declaredIn1AnnotatedInClass(Object o) {
declaredIn1AnnotatedInClassEvents.add(o);
}
代码示例来源:origin: google/guava
@Subscribe
@Override
public void call(String s) {
calls.incrementAndGet();
}
});
代码示例来源:origin: google/guava
@Subscribe
public void accept(String str) {
holder.set(str);
deliveries.incrementAndGet();
}
});
代码示例来源:origin: google/guava
@Subscribe
public void listenForStrings(String event) {
eventsReceived.add(event);
ready = false;
try {
bus.post(SECOND);
} finally {
ready = true;
}
}
代码示例来源:origin: google/guava
@Subscribe
public void listenForDoubles(Double event) {
assertTrue("I received an event when I wasn't ready!", ready);
eventsReceived.add(event);
}
}
代码示例来源:origin: google/guava
@Subscribe
@Override
public void overriddenAndAnnotatedInSubclass(Object o) {
super.overriddenAndAnnotatedInSubclass(o);
}
代码示例来源:origin: google/guava
/**
* Records the provided object in {@link #methodArgument} and sets {@link #methodCalled}. This
* method is called reflectively by Subscriber during tests, and must remain public.
*
* @param arg argument to record.
*/
@Subscribe
public void recordingMethod(Object arg) {
assertFalse(methodCalled);
methodCalled = true;
methodArgument = arg;
}
代码示例来源:origin: google/guava
@Subscribe
public void handleInteger(Integer integer) {
dispatchedSubscribers.add(this);
dispatcher.dispatch("hello", stringSubscribers.iterator());
}
代码示例来源:origin: google/guava
@Subscribe
@Override
public void overriddenAndAnnotatedInSubclass(Object o) {
super.overriddenAndAnnotatedInSubclass(o);
}
}
内容来源于网络,如有侵权,请联系作者删除!