public class ComponentEventBusUtil extends Object
ComponentEventBus.| Modifier and Type | Method and Description |
|---|---|
static <T extends ComponentEvent<?>> |
getEventConstructor(Class<T> eventType)
Gets the constructor to use for firing a component event, of the given
type, based on a DOM event.
|
static LinkedHashMap<String,Class<?>> |
getEventDataExpressions(Class<? extends ComponentEvent<?>> eventType)
Gets a map of event data expression (for
Element.addEventListener(String, com.vaadin.flow.dom.DomEventListener, String...)
) to Java type, with the same order as the parameters for the event
constructor (as returned by getEventConstructor(Class)). |
static boolean |
isDomEventConstructor(Constructor<?> constructor)
Checks if the given constructor can be used when firing a
ComponentEvent based on a DomEvent. |
public static LinkedHashMap<String,Class<?>> getEventDataExpressions(Class<? extends ComponentEvent<?>> eventType)
Element.addEventListener(String, com.vaadin.flow.dom.DomEventListener, String...)
) to Java type, with the same order as the parameters for the event
constructor (as returned by getEventConstructor(Class)).
Caches values and automatically uses the cached values when available.
eventType - the component event typepublic static <T extends ComponentEvent<?>> Constructor<T> getEventConstructor(Class<T> eventType)
T - the event typeeventType - the event typeIllegalArgumentException - if no suitable constructor was foundpublic static boolean isDomEventConstructor(Constructor<?> constructor)
ComponentEvent based on a DomEvent.constructor - the constructor to checktrue if the constructor can be used,
false otherwiseCopyright © 2019. All rights reserved.