Class FrontendDependencies

java.lang.Object
com.vaadin.flow.server.frontend.scanner.FrontendDependencies
All Implemented Interfaces:
FrontendDependenciesScanner, Serializable

public class FrontendDependencies extends Object
Represents the class dependency tree of the application.

For internal use only. May be renamed or removed in a future release.

Since:
2.0
See Also:
  • Field Details

  • Constructor Details

    • FrontendDependencies

      public FrontendDependencies(ClassFinder finder)
      Default Constructor.
      Parameters:
      finder - the class finder
    • FrontendDependencies

      public FrontendDependencies(ClassFinder finder, boolean generateEmbeddableWebComponents)
      Secondary constructor, which allows declaring whether embeddable web components should be checked for resource dependencies.
      Parameters:
      finder - the class finder
      generateEmbeddableWebComponents - true checks the WebComponentExporter classes for dependencies. true is default for FrontendDependencies(ClassFinder)
    • FrontendDependencies

      public FrontendDependencies(ClassFinder finder, boolean generateEmbeddableWebComponents, FeatureFlags featureFlags)
      Tertiary constructor, which allows declaring whether embeddable web components should be checked for resource dependencies.
      Parameters:
      finder - the class finder
      generateEmbeddableWebComponents - true checks the WebComponentExporter classes for dependencies. true is default for FrontendDependencies(ClassFinder)
      featureFlags - available feature flags and their status
  • Method Details

    • getPackages

      public Map<String,String> getPackages()
      Get all npm packages the application depends on.
      Returns:
      the set of npm packages
    • getPwaConfiguration

      public PwaConfiguration getPwaConfiguration()
      Get the PWA configuration of the application.
      Returns:
      the PWA configuration
    • getModules

      public List<String> getModules()
      Get all ES6 modules needed for run the application. Modules that are theme dependencies are guaranteed to precede other modules in the result.
      Returns:
      list of JS modules
    • getScripts

      public Set<String> getScripts()
      Get all the JS files used by the application.
      Returns:
      the set of JS files
    • getCss

      public Set<CssData> getCss()
      Get all the CSS files used by the application.
      Returns:
      the set of CSS files
    • getClasses

      public Set<String> getClasses()
      Get all Java classes considered when looking for used dependencies.
      Returns:
      the set of JS files
    • getEndPoints

      public Collection<EndPointData> getEndPoints()
      Get all entryPoints in the application.
      Returns:
      the set of JS files
    • getThemeDefinition

      public ThemeDefinition getThemeDefinition()
      Get the ThemeDefinition of the application.
      Returns:
      the theme definition
    • getTheme

      public AbstractTheme getTheme()
      Get the AbstractTheme instance used in the application.
      Returns:
      the theme instance
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getFinder

      protected final ClassFinder getFinder()
    • isExperimental

      protected final boolean isExperimental(String className)
    • getLumoTheme

      protected Class<? extends AbstractTheme> getLumoTheme()