Class FrontendWebComponentGenerator

java.lang.Object
io.jmix.flowui.devserver.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. Uses WebComponentModulesWriter to generate web component modules files from WebComponentExporter or WebComponentExporterFactory implementations found by ClassFinder.
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    FrontendWebComponentGenerator(com.vaadin.flow.server.frontend.scanner.ClassFinder finder)
    Creates a new instances and stores the finder to be used for locating WebComponentModulesWriter and WebComponentExporter/WebComponentExporterFactory classes.
  • Method Summary

    Modifier and Type
    Method
    Description
    generateWebComponents(File outputDirectory, com.vaadin.flow.theme.ThemeDefinition theme)
    Collects WebComponentModulesWriter class and classes that extend WebComponentExporter/WebComponentExporterFactory using finder.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • FrontendWebComponentGenerator

      public FrontendWebComponentGenerator(com.vaadin.flow.server.frontend.scanner.ClassFinder finder)
      Creates a new instances and stores the finder to be used for locating WebComponentModulesWriter and WebComponentExporter/WebComponentExporterFactory classes.
      Parameters:
      finder - ClassFinder implementation
  • Method Details

    • generateWebComponents

      public Set<File> generateWebComponents(File outputDirectory, com.vaadin.flow.theme.ThemeDefinition theme)
      Collects WebComponentModulesWriter class and classes that extend WebComponentExporter/WebComponentExporterFactory using finder. Generates web component modules and places the into the outputDirectory.
      Parameters:
      outputDirectory - target directory for the web component module files
      theme - the theme defined using Theme or null if not defined
      Returns:
      generated files
      Throws:
      IllegalStateException - if finder cannot locate required classes