Class StyleSheetHotswapper
- All Implemented Interfaces:
VaadinHotswapper
When a resource with .css extension is changed, this class determines
if the related file exists in a known public folder (`META-INF/resource`,
`resource`, `static`, `public`) in the output resources folder (e.g.
`target/classes` for Maven) and triggers a resource update by the Vaadin Dev
Server.
When a class with StyleSheet
annotation is changed, this hotswapper:
- Adds new link tags when annotation is added
- Updates link tags when annotation value is changed
- Removes link tags when annotation is removed
For AppShellConfigurator classes,
changes are applied globally to all UIs. For
Component classes, changes are applied when
the component is in use.
For internal use only. May be renamed or removed in a future release.
- Since:
- 25.0
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidonClassesChange(HotswapClassEvent event) Called by Vaadin hotswap entry point when one or more application classes have been updated.voidCalled by Vaadin hotswap entry point when one or more application classes have been updated.voidCalled by Vaadin hotswap entry point after all hotswap related operations have been completed.voidonInit(VaadinService vaadinService) Called during the initialization of the VaadinHotswapper.voidCalled by Vaadin hotswap entry point when one or more application resources have been updated.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.vaadin.base.devserver.hotswap.VaadinHotswapper
onClassLoadEvent, onClassLoadEvent
-
Field Details
-
LOGGER
public static final org.slf4j.Logger LOGGER
-
-
Constructor Details
-
StyleSheetHotswapper
public StyleSheetHotswapper()
-
-
Method Details
-
onInit
Description copied from interface:VaadinHotswapperCalled during the initialization of the VaadinHotswapper. This method provides an entry point for executing logic that needs to occur when the associated VaadinService is initialized and before any hotswap events are triggered.- Specified by:
onInitin interfaceVaadinHotswapper- Parameters:
vaadinService- the activeVaadinServiceinstance being initialized
-
onHotswapComplete
Description copied from interface:VaadinHotswapperCalled by Vaadin hotswap entry point after all hotswap related operations have been completed.- Specified by:
onHotswapCompletein interfaceVaadinHotswapper- Parameters:
event- an event containing information about the hotswap operation.
-
onClassesChange
Description copied from interface:VaadinHotswapperCalled by Vaadin hotswap entry point when one or more application classes have been updated.This method is meant to perform application-wide updates. Operation targeting Vaadin session should be implemented in
VaadinHotswapper.onClassesChange(HotswapClassSessionEvent)method.Currently, the default implementation delegates to the deprecated
VaadinHotswapper.onClassLoadEvent(VaadinService, Set, boolean)method for backward compatibility.- Specified by:
onClassesChangein interfaceVaadinHotswapper- Parameters:
event- the event instance carrying the information about the changed classes.- See Also:
-
onClassesChange
Description copied from interface:VaadinHotswapperCalled by Vaadin hotswap entry point when one or more application classes have been updated.This method is meant to perform updates at
VaadinSessionlevel. Operation targeting the entire application should be implemented inVaadinHotswapper.onClassesChange(HotswapClassEvent)method.Currently, the default implementation delegates to the deprecated
VaadinHotswapper.onClassLoadEvent(VaadinSession, Set, boolean)method for backward compatibility.- Specified by:
onClassesChangein interfaceVaadinHotswapper- Parameters:
event- the event instance carrying the information about the changed classes.- See Also:
-
onResourcesChange
Description copied from interface:VaadinHotswapperCalled by Vaadin hotswap entry point when one or more application resources have been updated.This method is meant to perform application-wide updates, involving all active UI instances.
- Specified by:
onResourcesChangein interfaceVaadinHotswapper- Parameters:
event- the event instance carrying the information about the changed resources.
-