Class StyleSheetHotswapper

java.lang.Object
com.vaadin.base.devserver.hotswap.impl.StyleSheetHotswapper
All Implemented Interfaces:
VaadinHotswapper

public class StyleSheetHotswapper extends Object implements VaadinHotswapper
Handles the automatic hotswapping of CSS resources and classes annotated with @StyleSheet, taking the appropriate actions to update stylesheets in the browser.

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