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

    • LUMO

      public static final String LUMO
      See Also:
    • ERROR_INVALID_LOAD_DEPENDENCIES_ANNOTATION

      protected static final String ERROR_INVALID_LOAD_DEPENDENCIES_ANNOTATION
    • ERROR_INVALID_PWA_ANNOTATION

      protected static final String ERROR_INVALID_PWA_ANNOTATION
  • 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
    • getDevPackages

      public Map<String,String> getDevPackages()
      Description copied from interface: FrontendDependenciesScanner
      Get all npm packages needed only for development.
      Returns:
      the `devDependencies` packages
    • getPwaConfiguration

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

      public Map<ChunkInfo,List<String>> getModules()
      Get all JS modules needed for run the application.
      Returns:
      list of JS modules
    • getModulesDevelopment

      public Map<ChunkInfo,List<String>> getModulesDevelopment()
      Get all JS modules needed in development mode.
      Returns:
      list of JS modules
    • getScripts

      public Map<ChunkInfo,List<String>> getScripts()
      Get all the JS files used by the application.
      Returns:
      the set of JS files
    • getScriptsDevelopment

      public Map<ChunkInfo,List<String>> getScriptsDevelopment()
      Get all the JS files needed in development mode.
      Returns:
      the set of JS files
    • getCss

      public Map<ChunkInfo,List<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
    • getEntryPoints

      public Collection<EntryPointData> getEntryPoints()
      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
    • shouldVisit

      protected boolean shouldVisit(String className)
    • 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()