You're viewing an older version of Vaadin JavaDoc. Please see version 24.7.0 for the latest.
com.vaadin.flow.component.

Class ComponentEventBusUtil

  • public class ComponentEventBusUtil
    extends Object

    Static helpers and caching functionality for ComponentEventBus.

    Since:

    1.0

    Author:

    Vaadin Ltd

    • Method Detail

      • getEventConstructor

        public static <T extends ComponentEvent<?>> Constructor<T> getEventConstructor​(Class<T> eventType)

        Gets the constructor to use for firing a component event, of the given type, based on a DOM event.

        Type Parameters:

        T - the event type

        Parameters:

        eventType - the event type

        Returns:

        the constructor to use when creating an event from a DOM event

        Throws:

        IllegalArgumentException - if no suitable constructor was found

      • isDomEventConstructor

        public static boolean isDomEventConstructor​(Constructor<?> constructor)

        Checks if the given constructor can be used when firing a ComponentEvent based on a DomEvent.

        Parameters:

        constructor - the constructor to check

        Returns:

        true if the constructor can be used, false otherwise