Package com.vaadin.flow.server.frontend
Class FrontendWebComponentGenerator
- java.lang.Object
-
- com.vaadin.flow.server.frontend.FrontendWebComponentGenerator
-
- All Implemented Interfaces:
Serializable
public class FrontendWebComponentGenerator extends Object implements Serializable
Generates embeddable web component files in npm mode, hiding the complexity caused by using a different class loader. UsesWebComponentModulesWriterto generate web component modules files fromWebComponentExporterorWebComponentExporterFactoryimplementations found byClassFinder.For internal use only. May be renamed or removed in a future release.
- Since:
- 2.0
- Author:
- Vaadin Ltd.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description FrontendWebComponentGenerator(ClassFinder finder)Creates a new instances and stores thefinderto be used for locatingWebComponentModulesWriterandWebComponentExporter/WebComponentExporterFactoryclasses.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Set<File>generateWebComponents(File outputDirectory, ThemeDefinition theme)CollectsWebComponentModulesWriterclass and classes that extendWebComponentExporter/WebComponentExporterFactoryusingfinder.
-
-
-
Constructor Detail
-
FrontendWebComponentGenerator
public FrontendWebComponentGenerator(ClassFinder finder)
Creates a new instances and stores thefinderto be used for locatingWebComponentModulesWriterandWebComponentExporter/WebComponentExporterFactoryclasses.- Parameters:
finder-ClassFinderimplementation
-
-
Method Detail
-
generateWebComponents
public Set<File> generateWebComponents(File outputDirectory, ThemeDefinition theme)
CollectsWebComponentModulesWriterclass and classes that extendWebComponentExporter/WebComponentExporterFactoryusingfinder. Generates web component modules and places the into theoutputDirectory.- Parameters:
outputDirectory- target directory for the web component module filestheme- the theme defined usingThemeornullif not defined- Returns:
- generated files
- Throws:
IllegalStateException- iffindercannot locate required classes
-
-