You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@Rob117 operations like stateMachine.validEventsFor(State.Liquid) // -> list(Event.OnFroze, event.OnVaporized) are not well supported because of the way state machine is implemented.
What state<State.Solid>, on<Event.OnCondensed>, on("A State"), and on("An Event") create are matchers, which are defined by a list of closures stored here.
Because the relationship between states and events is computed at runtime using closures, I don't think it is possible to extract all valid events for a state.
If this is confusing, please let me know.
Given the test code:
I want to know how I could, for example, do
stateMachine.validEventsFor(State.Liquid) // -> list(Event.OnFroze, event.OnVaporized)
Is there a way to do this, even with reflection?
The text was updated successfully, but these errors were encountered: