new Dependency(key, optional)
Instances are created internally during component registration.
Parameters:
Name | Type | Description |
---|---|---|
key |
String | The component key. |
optional |
boolean | true when the dependency is optional. |
Methods
-
<static> getOrCreate(key)
-
Parameters:
Name Type Description key
String | Dependency Returns:
- Type
- Dependency
-
key()
-
The key of the dependent component.
Returns:
The dependency key.- Type
- String
-
optional()
-
Determine if the dependency is optional.
Returns:
true
for an optional dependency.- Type
- boolean