com.vaadin.ui.
Class Dependency
- java.lang.Object
-
- com.vaadin.ui.Dependency
-
All Implemented Interfaces:
public class Dependency extends Object implements Serializable
Represents a stylesheet or JavaScript to include on the page.
Since:
8.0
Author:
Vaadin Ltd
See Also:
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Dependency.Type
The type of dependency.
-
Constructor Summary
Constructors Constructor Description Dependency(Dependency.Type type, String url)
Creates a new dependency of the given type, to be loaded from the given URL.
-
Method Summary
All Methods Modifier and Type Method Description static List<Dependency>
findDependencies(List<Class<? extends ClientConnector>> connectorTypes, LegacyCommunicationManager manager, DependencyFilter.FilterContext context)
Finds all the URLs defined for the given classes, registers the URLs to the communication manager, passes the registered dependencies through any defined filters and returns the filtered collection of dependencies to load.
Dependency.Type
getType()
Gets the type of the dependency.
String
getUrl()
Gets the untranslated URL for the dependency.
-
-
-
Constructor Detail
-
Dependency
public Dependency(Dependency.Type type, String url)
Creates a new dependency of the given type, to be loaded from the given URL.
The URL is passed through the translation mechanism before loading, so custom protocols such as "vaadin://" can be used.
Parameters:
type
- the type of dependency, notnull
url
- the URL to load the dependency from, notnull
-
-
Method Detail
-
getUrl
public String getUrl()
Gets the untranslated URL for the dependency.
Returns:
the URL for the dependency
-
getType
public Dependency.Type getType()
Gets the type of the dependency.
Returns:
the type of the dependency
-
findDependencies
public static List<Dependency> findDependencies(List<Class<? extends ClientConnector>> connectorTypes, LegacyCommunicationManager manager, DependencyFilter.FilterContext context)
Finds all the URLs defined for the given classes, registers the URLs to the communication manager, passes the registered dependencies through any defined filters and returns the filtered collection of dependencies to load.
Parameters:
connectorTypes
- the collection of connector classes to scanmanager
- a reference to the communication manager which tracks dependenciescontext
- the context information for the filtering operationReturns:
the list of found and filtered dependencies
Since:
8.1
-
-