EventFactory

public final class EventFactory

Helper for creating Event classes.

Functions

createArrayBacked
Link copied to clipboard
static Event<TcreateArrayBacked<T>(Class<? extends Object> type, Function<Array<T>, T> invokerFactory)
Create an "array-backed" Event instance.
static Event<TcreateArrayBacked<T>(Class<T> type, T emptyInvoker, Function<Array<T>, T> invokerFactory)
Create an "array-backed" Event instance with a custom empty invoker,for an event whose {@code invokerFactory} only delegates to the listeners.
getHandlerName
Link copied to clipboard
static String getHandlerName(Object handler)
Get the listener object name.
invalidate
Link copied to clipboard
static void invalidate()
Invalidate and re-create all existing "invoker" instances acrossevents created by this EventFactory.
isProfilingEnabled
Link copied to clipboard
static boolean isProfilingEnabled()
True if events are supposed to be profiled.

Sources

jvm source
Link copied to clipboard