Class DependencyList

java.lang.Object
com.vaadin.flow.component.internal.DependencyList
All Implemented Interfaces:
Serializable

public class DependencyList extends Object implements Serializable
List for storing dependencies/files (JavaScript, Stylesheets) to be loaded and included on the client side.

Tracks previously sent URLs and doesn't send them again.

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

Since:
1.0
Author:
Vaadin Ltd
See Also:
  • Constructor Details

    • DependencyList

      public DependencyList()
      Creates a new instance.
  • Method Details

    • add

      public void add(Dependency dependency)
      Adds the given dependency to be loaded by the client side.

      Does not send any previously sent dependencies again.

      Relative URLs are interpreted as relative to the configured frontend directory location. You can prefix the URL with context:// to make it relative to the context path or use an absolute URL to refer to files outside the frontend directory.

      Parameters:
      dependency - the dependency to include on the page
    • getPendingSendToClient

      public Collection<Dependency> getPendingSendToClient()
      Returns a list of dependencies which should be sent to the client.
      Returns:
      a list containing the dependencies which should be sent
    • clearPendingSendToClient

      public void clearPendingSendToClient()
      Clears the list of dependencies which should be sent to the client.