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. -
Method Summary
Modifier and TypeMethodDescriptionboolean
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.int
hashCode()
elemental.json.JsonObject
toJson()
Converts the object into json representation.toString()
-
Field Details
-
KEY_URL
- See Also:
-
KEY_TYPE
- See Also:
-
KEY_LOAD_MODE
- See Also:
-
KEY_CONTENTS
- 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 toLoadMode
for details.- Returns:
- the load mode that will be used during dependency loading
-
toJson
public elemental.json.JsonObject toJson()Converts the object into json representation.- Returns:
- json representation of the object
-
hashCode
public int hashCode() -
equals
-
toString
-