Locator

izumi.distage.model.Locator
See theLocator companion object
trait Locator

The object graph created by executing a plan. Can be queried for contained objects.

Attributes

See also:
Companion:
object
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes

Members list

Concise view

Value members

Abstract methods

def finalizers[F[_] : Tag]: Seq[Finalizer[F]]
def find[T : Tag]: Option[T]
def find[T : Tag](id: Identifier): Option[T]
def get[T : Tag]: T
def get[T : Tag](id: Identifier): T
def index: Map[DIKey, Any]

Attributes

Returns:

Only instances directly contained in this Locator, NOT instances in its parent Locators. Returned keys will be unique.

Objects in this locator in order of creation

Objects in this locator in order of creation

Attributes

Returns:

Only instances directly contained in this Locator, NOT instances in its parent Locators. Returned keys will be unique.

def lookupInstance[T : Tag](key: DIKey): Option[T]
def lookupInstanceOrThrow[T : Tag](key: DIKey): T
def lookupRef[T : Tag](key: DIKey): Option[TypedRef[T]]
def lookupRefOrThrow[T : Tag](key: DIKey): TypedRef[T]
def parent: Option[Locator]
def plan: Plan

The plan that produced this object graph

The plan that produced this object graph

Attributes

Concrete methods

final def allInstances: Seq[IdentifiedRef]

Attributes

Returns:

ALL instances contained in this locator and in all the parent locators, including injector bootstrap environment. Returned keys may overlap if parent locators contain objects for the same key. Instances from parent locators will be earlier in the list than instances from this locator.

See also:

izumi.distage.bootstrap.BootstrapLocator

final def run[T](function: Functoid[T]): T

Run function filling all the arguments from the object graph.

Run function filling all the arguments from the object graph.

Works similarly to function bindings in izumi.distage.model.definition.ModuleDef.

 objects.run {
   (hellower: Hellower, bye: Byer) =>
     hellower.hello()
     byer.bye()
 }

Attributes

See also:
final def runOption[T](function: Functoid[T]): Option[T]

Same as run but returns None if any of the arguments could not be fulfilled

Same as run but returns None if any of the arguments could not be fulfilled

Attributes