Rename EventBus#printExecutionOrder(Class) to debugExecutionOrder
The method doesn't print anything, but rather returns a string containing the debug information.
This commit is contained in:
@ -381,7 +381,7 @@ public final class EventBus {
|
||||
* @return a human-readable event handler list suitable for debugging purposes
|
||||
* @since 1.2.0
|
||||
*/
|
||||
public String printExecutionOrder(Class<?> eventType) {
|
||||
public String debugExecutionOrder(Class<?> eventType) {
|
||||
var handlers = getHandlersFor(eventType);
|
||||
var sj = new StringJoiner("\n");
|
||||
|
||||
|
@ -45,13 +45,13 @@ class DispatchTest {
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests {@link EventBus#printExecutionOrder(Class)} based on the currently registered handlers.
|
||||
* Tests {@link EventBus#debugExecutionOrder(Class)} based on the currently registered handlers.
|
||||
*
|
||||
* @since 1.2.0
|
||||
*/
|
||||
@Test
|
||||
void testPrintExecutionOrder() {
|
||||
String executionOrder = bus.printExecutionOrder(SimpleEvent.class);
|
||||
String executionOrder = bus.debugExecutionOrder(SimpleEvent.class);
|
||||
System.out.println(executionOrder);
|
||||
assertEquals(
|
||||
"Event handler execution order for class dev.kske.eventbus.core.SimpleEvent (3 handler(s)):\n"
|
||||
|
Reference in New Issue
Block a user