Class DomEventInfo
java.lang.Object
com.vaadin.flow.component.internal.DomEventInfo
What a component event type annotated with
DomEvent is fired with:
the constructor that creates it from a DOM event and the EventData of
its parameters. Computed from the event type on creation and never cached
here: ComponentEventBusUtil caches it for the application, and the
build creates it without a cache, so that a class it loads with a class
loader it closes afterwards is not kept by a static map.
For internal use only. May be renamed or removed in a future release.
- Since:
- 25.4
-
Constructor Summary
ConstructorsConstructorDescriptionDomEventInfo(Class<? extends ComponentEvent<?>> type) Scans the given event type. -
Method Summary
Modifier and TypeMethodDescriptionGets the event data ofgetListenerEventData()that the build puts into the bundle as functions, seeBundledEventData.LinkedHashMap<String, Class<?>> Gets the event data expressions mapped to the Java type of the constructor parameter they are passed as, in parameter order.Constructor<? extends ComponentEvent<?>> Gets the constructor to use when creating the event from a DOM event.Gets the event data ofgetListenerEventData()that the client gets as it is, which is all of it exceptgetBundledEventData().Gets the event data to add to a DOM listener registration, with expressions for components and elements mapped likeDomListenerRegistration.addEventDataElement(String)does.
-
Constructor Details
-
DomEventInfo
Scans the given event type.- Parameters:
type- the component event type, notnull- Throws:
IllegalArgumentException- if the event type has no suitable DOM event constructor
-
-
Method Details
-
getDataExpressions
Gets the event data expressions mapped to the Java type of the constructor parameter they are passed as, in parameter order.- Returns:
- the event data expressions, not
null
-
getListenerEventData
Gets the event data to add to a DOM listener registration, with expressions for components and elements mapped likeDomListenerRegistration.addEventDataElement(String)does.- Returns:
- an unmodifiable list, not
null
-
getExpressionEventData
Gets the event data ofgetListenerEventData()that the client gets as it is, which is all of it exceptgetBundledEventData().- Returns:
- an unmodifiable list, not
null
-
getBundledEventData
Gets the event data ofgetListenerEventData()that the build puts into the bundle as functions, seeBundledEventData.- Returns:
- an unmodifiable list, empty if there are none
-
getEventConstructor
Gets the constructor to use when creating the event from a DOM event.- Returns:
- the constructor, not
null
-