com.vaadin.flow.server.frontend.scanner.
Class FrontendDependencies
- java.lang.Object
-
- com.vaadin.flow.server.frontend.scanner.FrontendDependencies
-
All Implemented Interfaces:
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:
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.vaadin.flow.server.frontend.scanner.FrontendDependenciesScanner
FrontendDependenciesScanner.FrontendDependenciesScannerFactory
-
-
Field Summary
Fields Modifier and Type Field Description protected static String
ERROR_INVALID_PWA_ANNOTATION
static String
LUMO
-
Constructor Summary
Constructors Constructor Description FrontendDependencies(ClassFinder finder)
Default Constructor.
FrontendDependencies(ClassFinder finder, boolean generateEmbeddableWebComponents)
Secondary constructor, which allows declaring whether embeddable web components should be checked for resource dependencies.
FrontendDependencies(ClassFinder finder, boolean generateEmbeddableWebComponents, boolean useV14Bootstrap, FeatureFlags featureFlags)
Tertiary constructor, which allows declaring whether embeddable web components should be checked for resource dependencies.
-
Method Summary
All Methods Modifier and Type Method Description Set<String>
getClasses()
Get all Java classes considered when looking for used dependencies.
Set<CssData>
getCss()
Get all the CSS files used by the application.
Collection<EndPointData>
getEndPoints()
Get all entryPoints in the application.
protected ClassFinder
getFinder()
protected Class<? extends AbstractTheme>
getLumoTheme()
List<String>
getModules()
Get all ES6 modules needed for run the application.
Map<String,String>
getPackages()
Get all npm packages the application depends on.
PwaConfiguration
getPwaConfiguration()
Get the PWA configuration of the application.
Set<String>
getScripts()
Get all the JS files used by the application.
AbstractTheme
getTheme()
Get the
AbstractTheme
instance used in the application.ThemeDefinition
getThemeDefinition()
Get the
ThemeDefinition
of the application.protected boolean
isExperimental(String className)
String
toString()
-
-
-
Constructor Detail
-
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 findergenerateEmbeddableWebComponents
-true
checks theWebComponentExporter
classes for dependencies.true
is default forFrontendDependencies(ClassFinder)
-
FrontendDependencies
public FrontendDependencies(ClassFinder finder, boolean generateEmbeddableWebComponents, boolean useV14Bootstrap, FeatureFlags featureFlags)
Tertiary constructor, which allows declaring whether embeddable web components should be checked for resource dependencies.
Parameters:
finder
- the class findergenerateEmbeddableWebComponents
-true
checks theWebComponentExporter
classes for dependencies.true
is default forFrontendDependencies(ClassFinder)
useV14Bootstrap
- whether we are in legacy V14 bootstrap modefeatureFlags
- available feature flags and their status
-
-
Method Detail
-
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
-
getFinder
protected final ClassFinder getFinder()
-
isExperimental
protected final boolean isExperimental(String className)
-
getLumoTheme
protected Class<? extends AbstractTheme> getLumoTheme()
-
-