Packages

c

izumi.distage

InjectorDefaultImpl

class InjectorDefaultImpl extends Injector

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

Instance Constructors

  1. new InjectorDefaultImpl(parentContext: Locator, parentFactory: InjectorFactory)

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. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  8. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  9. def finish(semiPlan: SemiPlan): OrderedPlan
    Definition Classes
    InjectorDefaultImplPlanner
  10. def freeze(plan: PrePlan): SemiPlan
    Definition Classes
    InjectorDefaultImplPlanner
  11. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  12. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  13. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  14. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  15. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  16. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  17. def plan(input: PlannerInput): OrderedPlan
    Definition Classes
    InjectorDefaultImplPlanner
  18. final def plan(bindings: ModuleBase, roots: Roots): OrderedPlan
    Definition Classes
    Planner
  19. def planNoRewrite(input: PlannerInput): OrderedPlan
    Definition Classes
    InjectorDefaultImplPlanner
  20. def prepare(input: PlannerInput): PrePlan
    Definition Classes
    InjectorDefaultImplPlanner
  21. final def produce(bindings: ModuleBase, roots: Roots): DIResourceBase[Identity, Locator]
    Definition Classes
    Injector
  22. final def produce(input: PlannerInput): DIResourceBase[Identity, Locator]
    Definition Classes
    Injector
  23. final def produce(plan: OrderedPlan): DIResourceBase[Identity, Locator]
    Definition Classes
    Producer
  24. final def produceDetailed(plan: OrderedPlan): DIResourceBase[Identity, Either[FailedProvision[Identity], Locator]]
    Definition Classes
    Producer
  25. final def produceDetailedF[F[_]](plan: OrderedPlan)(implicit arg0: TagK[F], arg1: DIEffect[F]): DIResourceBase[F, Either[FailedProvision[F], Locator]]
    Definition Classes
    Producer
  26. final def produceEval[A](bindings: ModuleBase)(function: ProviderMagnet[A])(implicit arg0: Tag[A]): DIResourceBase[Identity, A]
    Definition Classes
    Injector
  27. final def produceEvalF[F[_], A](bindings: ModuleBase)(function: ProviderMagnet[F[A]])(implicit arg0: TagK[F], arg1: DIEffect[F]): DIResourceBase[F, A]

    Create an effectful izumi.distage.model.definition.DIResource 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.DIResource 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.hello()
      }

    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().produceEvalF[F, A](moduleDef)(fn) is a short-hand for:

    Injector()
      .produceF[F](moduleDef, GCMode(fn.get.diKeys.toSet))
      .evalMap(_.run(fn))
    Definition Classes
    Injector
  28. final def produceF[F[_]](bindings: ModuleBase, roots: Roots)(implicit arg0: TagK[F], arg1: DIEffect[F]): DIResourceBase[F, Locator]
    Definition Classes
    Injector
  29. final def produceF[F[_]](input: PlannerInput)(implicit arg0: TagK[F], arg1: DIEffect[F]): DIResourceBase[F, Locator]

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

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

    class HelloWorld { def hello() = println("hello world") }
    
    Injector()
      .produceGet[HelloWorld](new ModuleDef {
        make[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

    Definition Classes
    Injector
  30. final def produceF[F[_]](plan: OrderedPlan)(implicit arg0: TagK[F], arg1: DIEffect[F]): DIResourceBase[F, Locator]
    Definition Classes
    Producer
  31. final def produceGet[A](name: String)(bindings: ModuleBase)(implicit arg0: Tag[A]): DIResourceBase[Identity, A]
    Definition Classes
    Injector
  32. final def produceGet[A](bindings: ModuleBase)(implicit arg0: Tag[A]): DIResourceBase[Identity, A]
    Definition Classes
    Injector
  33. final def produceGetF[F[_], A](name: String)(bindings: ModuleBase)(implicit arg0: TagK[F], arg1: DIEffect[F], arg2: Tag[A]): DIResourceBase[F, A]
    Definition Classes
    Injector
  34. final def produceGetF[F[_], A](bindings: ModuleBase)(implicit arg0: TagK[F], arg1: DIEffect[F], arg2: Tag[A]): DIResourceBase[F, A]

    Create an effectful izumi.distage.model.definition.DIResource 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.DIResource 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]
      })(_.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().produceGetF[F, A](moduleDef) is a short-hand for:

    Injector()
      .produceF[F](moduleDef, GCMode(DIKey.get[A]))
      .map(_.get[A])
    Definition Classes
    Injector
  35. final def produceRun[A](bindings: ModuleBase)(function: ProviderMagnet[A])(implicit arg0: Tag[A]): A
    Definition Classes
    Injector
  36. final def produceRunF[F[_], A](bindings: ModuleBase)(function: ProviderMagnet[F[A]])(implicit arg0: TagK[F], arg1: DIEffect[F]): 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().produceRunF[F, A](moduleDef)(fn) is a short-hand for:

    Injector()
      .produceF[F](moduleDef, GCMode(fn.get.diKeys.toSet))
      .use(_.run(fn))
    Definition Classes
    Injector
  37. def rewrite(module: ModuleBase): ModuleBase
    Definition Classes
    InjectorDefaultImplPlanner
  38. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  39. def toString(): String
    Definition Classes
    AnyRef → Any
  40. final def trisectByKeys(appModule: ModuleBase, primaryRoots: Set[DIKey])(extractSubRoots: (OrderedPlan) => Set[DIKey]): TriSplittedPlan
    Definition Classes
    PlanSplittingOps
  41. final def trisectByRoots(appModule: ModuleBase, primaryRoots: Set[DIKey], subplanRoots: Set[DIKey]): TriSplittedPlan
    Definition Classes
    PlanSplittingOps
  42. def truncate(plan: OrderedPlan, roots: Set[DIKey]): OrderedPlan
    Definition Classes
    InjectorDefaultImplPlanner
  43. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  44. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  45. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()

Inherited from Injector

Inherited from Producer

Inherited from Planner

Inherited from PlanSplittingOps

Inherited from AnyRef

Inherited from Any

Ungrouped