Enum Class LoadMode

java.lang.Object
java.lang.Enum<LoadMode>
com.vaadin.flow.shared.ui.LoadMode
All Implemented Interfaces:
Serializable, Comparable<LoadMode>, Constable

public enum LoadMode extends Enum<LoadMode>
Determines a way that dependency is loaded. This mode can be specified when importing dependency either via annotations: or via Page methods:
Since:
1.0.
Author:
Vaadin Ltd
  • Enum Constant Details

    • INLINE

      public static final LoadMode INLINE
      Forced the dependency to be inlined in the body of the html page, removing the requirement to have additional roundtrips to fetch the script.

      It is guaranteed that all INLINE dependencies are loaded before any LAZY dependency.

    • EAGER

      public static final LoadMode EAGER
      Forces the dependency being loaded before the initial page load. This mode is suitable for situation when the application cannot start without the dependency being loaded first.

      It is guaranteed that all EAGER dependencies are loaded before any LAZY dependency.

    • LAZY

      public static final LoadMode LAZY
      Allows the dependency being loaded independent of the initial page load. This mode is suitable for situation when the application have no strict requirements on dependency load time.

      It is guaranteed that all EAGER dependencies are loaded before any LAZY dependency.

  • Method Details

    • values

      public static LoadMode[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static LoadMode valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null