Packages

trait Injector[F[_]] extends Planner with Producer

Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Injector
  2. Producer
  3. Planner
  4. PlanSplittingOps
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Abstract Value Members

  1. implicit abstract def F: QuasiIO[F]
    Attributes
    protected[this]
  2. abstract def plan(input: PlannerInput): OrderedPlan
    Definition Classes
    Planner
  3. abstract def planNoRewrite(input: PlannerInput): OrderedPlan
    Definition Classes
    Planner
  4. abstract def providedEnvironment: InjectorProvidedEnv
  5. abstract def providedKeys: Set[DIKey]

    Keys that will be available to the module interpreted by this Injector, includes parent Locator keys, izumi.distage.modules.DefaultModule & Injector's self-reference keys

  6. abstract def rewrite(bindings: ModuleBase): ModuleBase
    Definition Classes
    Planner
  7. implicit abstract def tagK: TagK[F]
    Attributes
    protected[this]

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. final def assert(bindings: ModuleBase, roots: Roots, excludedActivations: Set[NonEmptySet[AxisChoice]] = Set.empty): Unit

    Efficiently check all possible paths for the given module to the given roots,

    Efficiently check all possible paths for the given module to the given roots,

    This is a "raw" version of izumi.distage.framework.PlanCheck API, please use PlanCheck for all non-exotic needs.

    This method executes at runtime, to check correctness at compile-time use PlanCheck API from distage-framework module.

    Exceptions thrown

    PlanCheckException on found issues

    See also

    Compile-Time Checks

  6. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
  7. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  8. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  9. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  10. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  11. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  12. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  13. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  14. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  15. final def plan(bindings: ModuleBase, roots: Roots): OrderedPlan
    Definition Classes
    Planner
    Annotations
    @inline()
  16. final def plan(bindings: ModuleBase, activation: Activation, roots: Roots): OrderedPlan
    Definition Classes
    Planner
    Annotations
    @inline()
  17. final def produce(plan: OrderedPlan): Lifecycle[F, Locator]

    Create an effectful izumi.distage.model.definition.Lifecycle value that encapsulates the allocation and cleanup of an object graph described by an existing plan

    Create an effectful izumi.distage.model.definition.Lifecycle value that encapsulates the allocation and cleanup of an object graph described by an existing plan

    class HelloWorld {
      def hello() = println("hello world")
    }
    
    val injector = Injector()
    
    val plan = injector.plan(PlannerInput(
        bindings = new ModuleDef {
          make[HelloWorld]
        },
        activation = Activation.empty,
        roots = Roots.target[HelloWorld],
      ))
    
    injector
      .produce(plan)
      .use(_.get[HelloWorld].hello())
    plan

    Computed wiring plan, may be produced by calling the plan method

    returns

    A Resource value that encapsulates allocation and cleanup of the object graph described by input

  18. final def produce(bindings: ModuleBase, roots: Roots, activation: Activation = Activation.empty): Lifecycle[F, Locator]
  19. final def produce(input: PlannerInput): Lifecycle[F, Locator]

    Create an effectful izumi.distage.model.definition.Lifecycle value that encapsulates the allocation and cleanup of an object graph described by input

    Create an effectful izumi.distage.model.definition.Lifecycle value that encapsulates the allocation and cleanup of an object graph described by input

    class HelloWorld {
      def hello() = println("hello world")
    }
    
    Injector()
      .produce(PlannerInput(
        bindings = new ModuleDef {
          make[HelloWorld]
        },
        activation = Activation.empty,
        roots = Roots.target[HelloWorld],
      ))
      .use(_.get[HelloWorld].hello())
    input

    Bindings created by izumi.distage.model.definition.ModuleDef DSL and garbage collection roots. Garbage collector will remove all bindings that aren't direct or indirect dependencies of the chosen root DIKeys from the plan - they will never be instantiated. If left empty, garbage collection will not be performed – that would be equivalent to designating all DIKeys as roots.

    returns

    A Resource value that encapsulates allocation and cleanup of the object graph described by input

  20. final def produceCustomF[G[_]](plannerInput: PlannerInput)(implicit arg0: TagK[G], arg1: QuasiIO[G]): Lifecycle[G, Locator]

    Produce izumi.distage.model.Locator interpreting effect and resource bindings into the provided effect type

  21. final def produceCustomF[F[_]](plan: OrderedPlan)(implicit arg0: TagK[F], arg1: QuasiIO[F]): Lifecycle[F, Locator]

    Produce izumi.distage.model.Locator interpreting effect- and resource-bindings into the provided F

    Produce izumi.distage.model.Locator interpreting effect- and resource-bindings into the provided F

    Definition Classes
    Producer
  22. final def produceCustomIdentity(plannerInput: PlannerInput): Lifecycle[Identity, Locator]

    Produce izumi.distage.model.Locator, supporting only effect and resource bindings in Identity

  23. final def produceCustomIdentity(plan: OrderedPlan): Lifecycle[Identity, Locator]

    Produce izumi.distage.model.Locator, supporting only effect- and resource-bindings in Identity

    Produce izumi.distage.model.Locator, supporting only effect- and resource-bindings in Identity

    Definition Classes
    Producer
  24. final def produceDetailedCustomF[G[_]](plannerInput: PlannerInput)(implicit arg0: TagK[G], arg1: QuasiIO[G]): Lifecycle[G, Either[FailedProvision[G], Locator]]
  25. final def produceDetailedCustomF[F[_]](plan: OrderedPlan)(implicit arg0: TagK[F], arg1: QuasiIO[F]): Lifecycle[F, Either[FailedProvision[F], Locator]]
    Definition Classes
    Producer
  26. final def produceDetailedIdentity(plannerInput: PlannerInput): Lifecycle[Identity, Either[FailedProvision[Identity], Locator]]
  27. final def produceDetailedIdentity(plan: OrderedPlan): Lifecycle[Identity, Either[FailedProvision[Identity], Locator]]
    Definition Classes
    Producer
  28. final def produceEval[A](bindings: ModuleBase, activation: Activation = Activation.empty)(function: Functoid[F[A]]): Lifecycle[F, A]

    Create an effectful izumi.distage.model.definition.Lifecycle value that encapsulates the allocation and cleanup of an object graph described by the input module, designate all arguments of the provided function as roots of the graph and run the function.

    Create an effectful izumi.distage.model.definition.Lifecycle value that encapsulates the allocation and cleanup of an object graph described by the input module, designate all arguments of the provided function as roots of the graph and run the function.

    class Hello { def hello() = println("hello") }
    class World { def world() = println("world") }
    
    Injector()
      .produceEval(new ModuleDef {
        make[Hello]
        make[World]
      }) {
        (hello: Hello, world: World) =>
          hello.hello()
          world
      }
      .use {
        world =>
          world.world()
      }

    This is useful for the common case when you want to run an effect using the produced objects from the object graph, without finalizing the object graph yet

    Injector[F]().produceEval[A](moduleDef)(fn) is a short-hand for:

    Injector[F]()
      .produce(moduleDef, Roots(fn.get.diKeys.toSet))
      .evalMap(_.run(fn)): Lifecycle[F, A]
    bindings

    Bindings created by izumi.distage.model.definition.ModuleDef DSL

    activation

    A map of axes of configuration to choices along these axes

    function

    N-ary izumi.distage.model.providers.Functoid function for which arguments will be designated as roots and provided from the object graph

  29. final def produceGet[A](name: Identifier)(bindings: ModuleBase, activation: Activation = Activation.empty)(implicit arg0: Tag[A]): Lifecycle[F, A]
  30. final def produceGet[A](bindings: ModuleBase)(implicit arg0: Tag[A]): Lifecycle[F, A]
  31. final def produceGet[A](bindings: ModuleBase, activation: Activation)(implicit arg0: Tag[A]): Lifecycle[F, A]

    Create an effectful izumi.distage.model.definition.Lifecycle value that encapsulates the allocation and cleanup of an object graph described by the input module, designate A as the root of the graph and retrieve A from the result.

    Create an effectful izumi.distage.model.definition.Lifecycle value that encapsulates the allocation and cleanup of an object graph described by the input module, designate A as the root of the graph and retrieve A from the result.

    class HelloWorld {
      def hello() = println("hello world")
    }
    
    Injector()
      .produceGet[HelloWorld](new ModuleDef {
        make[HelloWorld]
      })
      .use(_.hello())

    This is useful for the common case when your main logic class is the root of your graph AND the object you want to use immediately.

    Injector[F]().produceGet[A](moduleDef) is a short-hand for:

    Injector[F]()
      .produce(moduleDef, Roots(DIKey.get[A]))
      .map(_.get[A]): Lifecycle[F, A]
    bindings

    Bindings created by izumi.distage.model.definition.ModuleDef DSL

    activation

    A map of axes of configuration to choices along these axes

  32. final def produceRun[A](bindings: ModuleBase, activation: Activation = Activation.empty)(function: Functoid[F[A]]): F[A]

    Create an an object graph described by the input module, designate all arguments of the provided function as roots of the graph, and run the function, deallocating the object graph when the function exits.

    Create an an object graph described by the input module, designate all arguments of the provided function as roots of the graph, and run the function, deallocating the object graph when the function exits.

    class Hello { def hello() = println("hello") }
    class World { def world() = println("world") }
    
    Injector()
      .produceRun(new ModuleDef {
        make[Hello]
        make[World]
      }) {
        (hello: Hello, world: World) =>
          hello.hello()
          world.world()
      }

    This is useful for the common case when you want to run an effect using the produced objects from the object graph and deallocate the object graph once the effect is finished

    Injector[F]().produceRun[A](moduleDef)(fn) is a short-hand for:

    Injector[F]()
      .produce(moduleDef, Roots(fn.get.diKeys.toSet))
      .use(_.run(fn)): F[A]
    bindings

    Bindings created by izumi.distage.model.definition.ModuleDef DSL

    activation

    A map of axes of configuration to choices along these axes

    function

    N-ary izumi.distage.model.providers.Functoid function for which arguments will be designated as roots and provided from the object graph

  33. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  34. def toString(): String
    Definition Classes
    AnyRef → Any
  35. final def trisectByKeys(activation: Activation, appModule: ModuleBase, primaryRoots: Set[DIKey])(extractSubRoots: (OrderedPlan) => (Set[DIKey], Set[DIKey])): TriSplittedPlan
    Definition Classes
    PlanSplittingOps
  36. final def trisectByRoots(activation: Activation, appModule: ModuleBase, primaryRoots: Set[DIKey], subplanRoots1: Set[DIKey], subplanRoots2: Set[DIKey]): TriSplittedPlan
    Definition Classes
    PlanSplittingOps
  37. final def verify(bindings: ModuleBase, roots: Roots, excludedActivations: Set[NonEmptySet[AxisChoice]] = Set.empty): PlanVerifierResult

    Efficiently check all possible paths for the given module to the given roots,

    Efficiently check all possible paths for the given module to the given roots,

    This is a "raw" version of izumi.distage.framework.PlanCheck API, please use PlanCheck for all non-exotic needs.

    This method executes at runtime, to check correctness at compile-time use PlanCheck API from distage-framework module.

    returns

    Set of issues if any. Does not throw.

    See also

    Compile-Time Checks

  38. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  39. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  40. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated
  2. final def produceEvalF[A](bindings: ModuleBase, activation: Activation = Activation.empty)(function: Functoid[F[A]])(implicit arg0: Tag[A]): Lifecycle[F, A]
    Annotations
    @deprecated
    Deprecated

    (Since version 1.0) Use .produceEval. Parameterize Injector with F on creation: Injector[F]()

  3. final def produceF(plan: OrderedPlan): Lifecycle[F, Locator]
    Annotations
    @deprecated
    Deprecated

    (Since version 1.0) Use .produce. Parameterize Injector with F on creation: Injector[F]()

  4. final def produceF(bindings: ModuleBase, roots: Roots, activation: Activation = Activation.empty): Lifecycle[F, Locator]
    Annotations
    @deprecated
    Deprecated

    (Since version 1.0) Use .produce. Parameterize Injector with F on creation: Injector[F]()

  5. final def produceF(input: PlannerInput): Lifecycle[F, Locator]
    Annotations
    @deprecated
    Deprecated

    (Since version 1.0) Use .produce. Parameterize Injector with F on creation: Injector[F]()

  6. final def produceGetF[A](name: Identifier)(bindings: ModuleBase, activation: Activation = Activation.empty)(implicit arg0: Tag[A]): Lifecycle[F, A]
    Annotations
    @deprecated
    Deprecated

    (Since version 1.0) Use .produceGet. Parameterize Injector with F on creation: Injector[F]()

  7. final def produceGetF[A](bindings: ModuleBase)(implicit arg0: Tag[A]): Lifecycle[F, A]
    Annotations
    @deprecated
    Deprecated

    (Since version 1.0) Use .produceGet. Parameterize Injector with F on creation: Injector[F]()

  8. final def produceGetF[A](bindings: ModuleBase, activation: Activation)(implicit arg0: Tag[A]): Lifecycle[F, A]
    Annotations
    @deprecated
    Deprecated

    (Since version 1.0) Use .produceGet. Parameterize Injector with F on creation: Injector[F]()

  9. final def produceRunF[A](bindings: ModuleBase, activation: Activation = Activation.empty)(function: Functoid[F[A]])(implicit arg0: Tag[A]): F[A]
    Annotations
    @deprecated
    Deprecated

    (Since version 1.0) Use .produceRun. Parameterize Injector with F on creation: Injector[F]()

Inherited from Producer

Inherited from Planner

Inherited from PlanSplittingOps

Inherited from AnyRef

Inherited from Any

Ungrouped