Document Latest Features in README #27

Merged
kske merged 6 commits from f/improved-readme into develop 2021-11-26 13:54:58 +01:00
Owner

Additionally, rename EventBus#printExecutionOrder(Class) to debugExecutionOrder for clarity, as it doesn't actually print anything.

Additionally, rename `EventBus#printExecutionOrder(Class)` to `debugExecutionOrder` for clarity, as it doesn't actually print anything.
kske self-assigned this 2021-11-24 10:50:09 +01:00
kske added 3 commits 2021-11-24 10:50:09 +01:00
kske requested review from delvh 2021-11-24 10:50:24 +01:00
delvh requested changes 2021-11-25 11:26:05 +01:00
README.md Outdated
@ -57,0 +78,4 @@
If you intend to use event handlers that are inaccessible to Event Bus by means of Java language access control, make sure to allow reflective access from your module:
```java
opens my.module to dev.kske.eventbus.core;
Owner

opens works for modules as well?
I thought it should have been opens my.package to dev.kske.eventbus.core...

`opens` works for modules as well? I thought it should have been `opens my.package to dev.kske.eventbus.core`...
Author
Owner

This seems to be wrong actually. I will change it accordingly.

This seems to be wrong actually. I will change it accordingly.
kske marked this conversation as resolved
README.md Outdated
@ -178,3 +205,3 @@
```java
requires dev.kske.eventbus.core;
System.out.println(EventBus.getInstance().printExecutionOrder(SimpleEvent.class));
Owner

Something looks strange here:
a) if printXY prints directly, the syso part is unneeded.
b) if printXY only returns the result, then the function should be renamed.

Something looks strange here: a) if `printXY` prints directly, the `syso` part is unneeded. b) if `printXY` only returns the result, then the function should be renamed.
Author
Owner

The code itself is correct, but I agree that the name of the method can be misleading. What would you call a method that formats the execution order in a human-readable way as a string, but doesn't print it. Printing it to sysout directly seemed to specific to me, as some applications would prefer using a logger instead.

The code itself is correct, but I agree that the name of the method can be misleading. What would you call a method that formats the execution order in a human-readable way as a string, but doesn't print it. Printing it to sysout directly seemed to specific to me, as some applications would prefer using a logger instead.
Owner

generateExecutionOrder?
getDebugInformation?
createExecutionOrderString?
executionOrderAsString?
getExecutionOrderAsString?

`generateExecutionOrder`? `getDebugInformation`? `createExecutionOrderString`? `executionOrderAsString`? `getExecutionOrderAsString`?
kske marked this conversation as resolved
kske added 1 commit 2021-11-25 14:29:12 +01:00
Reflective access has to be allowed from the Event Bus core package to a
package in the user's project, not the entire module. Thank you @delvh
for noticing this!
kske added 1 commit 2021-11-25 14:34:18 +01:00
The method doesn't print anything, but rather returns a string
containing the debug information.
kske added 1 commit 2021-11-25 14:36:13 +01:00
Conflicts:
	event-bus-core/src/test/java/dev/kske/eventbus/core/DispatchTest.java
kske requested review from delvh 2021-11-25 14:36:53 +01:00
delvh approved these changes 2021-11-26 13:21:39 +01:00
kske merged commit 11860d1469 into develop 2021-11-26 13:54:58 +01:00
kske deleted branch f/improved-readme 2021-11-26 13:54:58 +01:00
Sign in to join this conversation.
No reviewers
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: zdm/event-bus#27
No description provided.