Package com.vaadin.flow.shared.ui
Class Dependency
java.lang.Object
com.vaadin.flow.shared.ui.Dependency
- All Implemented Interfaces:
Serializable
Represents an html import, stylesheet or JavaScript to include on the page.
- Since:
- 1.0
- Author:
- Vaadin Ltd
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDependency(Dependency.Type type, String expression) Creates a new dependency of the given type, to be loaded using JS expression which is supposed to return aPromise.Dependency(Dependency.Type type, String url, LoadMode loadMode) Creates a new dependency of the given type, to be loaded from the given URL.Dependency(Dependency.Type type, String url, LoadMode loadMode, String id) Creates a new dependency of the given type, to be loaded from the given URL with an optional ID for tracking.Dependency(Dependency.Type type, String url, LoadMode loadMode, String id, String layer) Creates a new dependency of the given type, to be loaded from the given URL into the given CSS cascade layer, with an optional ID for tracking. -
Method Summary
Modifier and TypeMethodDescriptionbooleangetId()Gets the ID associated with this dependency.getLayer()Gets the CSS cascade layer the style sheet is loaded into.Gets load mode that will be used for dependency loading.getType()Gets the type of the dependency.getUrl()Gets the untranslated URL for the dependency.inthashCode()toString()
-
Field Details
-
KEY_URL
- See Also:
-
KEY_TYPE
- See Also:
-
KEY_LOAD_MODE
- See Also:
-
KEY_CONTENTS
- See Also:
-
KEY_ID
- See Also:
-
KEY_LAYER
- See Also:
-
-
Constructor Details
-
Method Details
-
getUrl
Gets the untranslated URL for the dependency.- Returns:
- the URL for the dependency
-
getType
Gets the type of the dependency.- Returns:
- the type of the dependency
-
getLoadMode
Gets load mode that will be used for dependency loading. Refer toLoadModefor details.- Returns:
- the load mode that will be used during dependency loading
-
getId
Gets the ID associated with this dependency.For internal use only. May be renamed or removed in a future release.
- Returns:
- the dependency ID or null if not set
- Since:
- 25.0
-
getLayer
Gets the CSS cascade layer the style sheet is loaded into.For internal use only. May be renamed or removed in a future release.
- Returns:
- the layer name or null if the dependency does not use a layer
-
hashCode
public int hashCode() -
equals
-
toString
-