Package com.vaadin.flow.server.frontend
Class FrontendWebComponentGenerator
java.lang.Object
com.vaadin.flow.server.frontend.FrontendWebComponentGenerator
- All Implemented Interfaces:
Serializable
Generates embeddable web component files in npm mode, hiding the complexity
caused by using a different class loader.
Uses
WebComponentModulesWriter
to
generate web component modules files from
WebComponentExporter
or
WebComponentExporterFactory
implementations found by
ClassFinder
.
For internal use only. May be renamed or removed in a future release.
- Since:
- 2.0
- Author:
- Vaadin Ltd.
- See Also:
-
Constructor Summary
ConstructorDescriptionCreates a new instances and stores thefinder
to be used for locatingWebComponentModulesWriter
andWebComponentExporter
/WebComponentExporterFactory
classes. -
Method Summary
Modifier and TypeMethodDescriptiongenerateWebComponents
(File outputDirectory, ThemeDefinition theme) CollectsWebComponentModulesWriter
class and classes that extendWebComponentExporter
/WebComponentExporterFactory
usingfinder
.
-
Constructor Details
-
FrontendWebComponentGenerator
Creates a new instances and stores thefinder
to be used for locatingWebComponentModulesWriter
andWebComponentExporter
/WebComponentExporterFactory
classes.- Parameters:
finder
-ClassFinder
implementation
-
-
Method Details
-
generateWebComponents
CollectsWebComponentModulesWriter
class and classes that extendWebComponentExporter
/WebComponentExporterFactory
usingfinder
. Generates web component modules and places the into theoutputDirectory
.- Parameters:
outputDirectory
- target directory for the web component module filestheme
- the theme defined usingTheme
ornull
if not defined- Returns:
- generated files
- Throws:
IllegalStateException
- iffinder
cannot locate required classes
-