Invokes the subscriber method. This method can be overridden to make the invocation synchronized.
(Object event)
| 90 | */ |
| 91 | |
| 92 | @VisibleForTesting |
| 93 | void invokeSubscriberMethod(Object event) throws InvocationTargetException { |
| 94 | try { |
| 95 | method.invoke(target, checkNotNull(event)); |
| 96 | } catch (IllegalArgumentException e) { |
| 97 | throw new Error("Method rejected target/argument: " + event, e); |
| 98 | } catch (IllegalAccessException e) { |
| 99 | throw new Error("Method became inaccessible: " + event, e); |
| 100 | } catch (InvocationTargetException e) { |
| 101 | if (e.getCause() instanceof Error) { |
| 102 | throw (Error) e.getCause(); |
| 103 | } |
| 104 | throw e; |
| 105 | } |
| 106 | } |
| 107 | |
| 108 | /** |
| 109 | * Gets the context for the given event. |
no test coverage detected