DependsOn class

Names beans that must be created before this one and destroyed after it.

The container already orders beans by their injected dependencies. Use this only for a dependency it cannot see: a bean that relies on another bean's side effect (a database schema created, a global set up) without injecting it.

@Component()
@DependsOn(['connection'])
class Migrations {
  Migrations() {
    // runs after the `connection` bean was created
  }
}

Spring (Java):

@Component
@DependsOn("connection")
class Migrations { ... }

Constructors

DependsOn(List<String> value)
Declares the bean names this bean depends on.
const

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
value → List<String>
Names of the beans created before this one.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited