com.vaadin.flow.component.internal.

Class EventDataCache

    • Constructor Detail

      • EventDataCache

        public EventDataCache()
    • Method Detail

      • getDataExpressions

        public Optional<LinkedHashMap<String,Class<?>>> getDataExpressions(Class<? extends ComponentEvent<?>> eventType)

        Gets the cached data expressions for the given event type.

        Parameters:

        eventType - the component event type

        Returns:

        an optional containing the data expressions or an empty optional if no data expressions have been cached for the given event type

      • setDataExpressions

        public LinkedHashMap<String,Class<?>> setDataExpressions(Class<? extends ComponentEvent<?>> eventType,
                                                                 LinkedHashMap<String,Class<?>> expressions)

        Stores the given data expressions for the given event type in the cache.

        Parameters:

        eventType - the component event type

        expressions - the data expressions to store

        Returns:

        the stored data expressions

      • getEventConstructor

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

        Gets the cached DOM event constructor for the given event type.

        Type Parameters:

        T - the component event type

        Parameters:

        eventType - the component event type

        Returns:

        an optional containing the DOM event constructor or an empty optional if no DOM event constructor has been cached for the given event type

      • setEventConstructor

        public <T extends ComponentEvent<?>> Constructor<T> setEventConstructor(Class<T> eventType,
                                                                                Constructor<T> constructor)

        Stores the given DOM event constructor for the given event type in the cache.

        Type Parameters:

        T - the event type

        Parameters:

        eventType - the component event type

        constructor - the DOM event constructor to store

        Returns:

        the stored DOM event constructor