Java 类org.greenrobot.eventbus.EventBusException 实例源码

项目:HomeAutomation    文件:CustomEventBus.java   
public void register(final Object object) {

        final Class clazz = object.getClass();
        final String clazzName = clazz.getName();

        if (getClasses().containsKey(clazzName)) {
            System.out.println("Class already registered on eventbus: " + clazzName);
        } else {
            System.out.println("Registering Class on eventbus: " + clazz.getName());
            try {
                eventBus.register(object);
            } catch (final EventBusException e) {

            }
            getClasses().put(clazzName, clazz);
        }
    }
项目:GitHub    文件:AbstractSubscriberInfo.java   
protected SubscriberMethod createSubscriberMethod(String methodName, Class<?> eventType, ThreadMode threadMode,
                                                  int priority, boolean sticky) {
    try {
        Method method = subscriberClass.getDeclaredMethod(methodName, eventType);
        return new SubscriberMethod(method, eventType, threadMode, priority, sticky);
    } catch (NoSuchMethodException e) {
        throw new EventBusException("Could not find subscriber method in " + subscriberClass +
                ". Maybe a missing ProGuard rule?", e);
    }
}
项目:AyoSunny    文件:AbstractSubscriberInfo.java   
protected SubscriberMethod createSubscriberMethod(String methodName, Class<?> eventType, ThreadMode threadMode,
                                                  int priority, boolean sticky) {
    try {
        Method method = subscriberClass.getDeclaredMethod(methodName, eventType);
        return new SubscriberMethod(method, eventType, threadMode, priority, sticky);
    } catch (NoSuchMethodException e) {
        throw new EventBusException("Could not find subscriber method in " + subscriberClass +
                ". Maybe a missing ProGuard rule?", e);
    }
}
项目:lr_dialer    文件:AbstractSubscriberInfo.java   
protected SubscriberMethod createSubscriberMethod(String methodName, Class<?> eventType, ThreadMode threadMode,
                                                  int priority, boolean sticky) {
    try {
        Method method = subscriberClass.getDeclaredMethod(methodName, eventType);
        return new SubscriberMethod(method, eventType, threadMode, priority, sticky);
    } catch (NoSuchMethodException e) {
        throw new EventBusException("Could not find subscriber method in " + subscriberClass +
                ". Maybe a missing ProGuard rule?", e);
    }
}
项目:Hentoid    文件:Bus.java   
public static void register(EventBus bus, Object listener) {
    try {
        bus.register(listener);
    } catch (EventBusException e) {
        LogHelper.w(TAG, e);
    }
}
项目:Hentoid    文件:Bus.java   
public static void unregister(EventBus bus, Object listener) {
    try {
        bus.unregister(listener);
    } catch (EventBusException e) {
        LogHelper.w(TAG, e);
    }
}