trait LocatorDef extends AbstractLocator with AbstractBindingDefDSL[BindDSL, SetDSL]

Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. LocatorDef
  2. AbstractBindingDefDSL
  3. AbstractLocator
  4. Locator
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

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 addImplicit[T](name: String)(implicit arg0: reflection.universe.RuntimeDIUniverse.Tag[T], instance: T, pos: CodePositionMaterializer): Unit

    Same as make[T].named(name).from(implicitly[T]) *

    Same as make[T].named(name).from(implicitly[T]) *

    Attributes
    protected
    Definition Classes
    AbstractBindingDefDSL
  5. final def addImplicit[T](implicit arg0: reflection.universe.RuntimeDIUniverse.Tag[T], instance: T, pos: CodePositionMaterializer): Unit

    Same as make[T].from(implicitly[T]) *

    Same as make[T].from(implicitly[T]) *

    Attributes
    protected
    Definition Classes
    AbstractBindingDefDSL
  6. final def allInstances: Seq[IdentifiedRef]

    ALL instances contained in this locator and in ALL the parent locators, including injector bootstrap environment.

    ALL instances contained in this locator and in ALL the parent locators, including injector bootstrap environment. Keys may be not unique.

    Definition Classes
    Locator
    See also

    com.github.pshirshov.izumi.distage.bootstrap.BootstrapLocator

  7. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  8. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate() @throws( ... )
  9. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  10. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  11. def finalizers[F[_]](implicit arg0: reflection.universe.RuntimeDIUniverse.TagK[F]): Seq[Finalizer[F]]
    Attributes
    protected[com.github.pshirshov.izumi.distage]
    Definition Classes
    LocatorDefLocator
  12. final def find[T](id: String)(implicit arg0: reflection.universe.RuntimeDIUniverse.Tag[T]): Option[T]
    Definition Classes
    AbstractLocatorLocator
  13. final def find[T](implicit arg0: reflection.universe.RuntimeDIUniverse.Tag[T]): Option[T]
    Definition Classes
    AbstractLocatorLocator
  14. final def get[T](id: String)(implicit arg0: reflection.universe.RuntimeDIUniverse.Tag[T]): T
    Definition Classes
    AbstractLocatorLocator
  15. final def get[T](implicit arg0: reflection.universe.RuntimeDIUniverse.Tag[T]): T
    Definition Classes
    AbstractLocatorLocator
  16. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  17. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  18. def index: Map[reflection.universe.RuntimeDIUniverse.DIKey, Any]
    Definition Classes
    Locator
  19. def initialState: ArrayBuffer[BindingRef]
    Attributes
    protected
  20. def instances: Seq[IdentifiedRef]

    Instances in order of creation

    Instances in order of creation

    returns

    *Only* instances contained in this Locator, *NOT* instances in parent Locators. All the keys must be unique

    Definition Classes
    LocatorDefLocator
  21. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  22. def lookup[T](key: reflection.universe.RuntimeDIUniverse.DIKey)(implicit arg0: reflection.universe.RuntimeDIUniverse.Tag[T]): Option[reflection.universe.RuntimeDIUniverse.TypedRef[T]]
    Attributes
    protected[com.github.pshirshov.izumi.distage]
    Definition Classes
    AbstractLocatorLocator
  23. final def lookupInstance[T](key: reflection.universe.RuntimeDIUniverse.DIKey)(implicit arg0: reflection.universe.RuntimeDIUniverse.Tag[T]): Option[T]
    Definition Classes
    AbstractLocatorLocator
  24. final def lookupInstanceOrThrow[T](key: reflection.universe.RuntimeDIUniverse.DIKey)(implicit arg0: reflection.universe.RuntimeDIUniverse.Tag[T]): T
    Definition Classes
    AbstractLocatorLocator
  25. final def make[T](implicit arg0: reflection.universe.RuntimeDIUniverse.Tag[T], pos: CodePositionMaterializer): BindDSL[T]
    Attributes
    protected
    Definition Classes
    AbstractBindingDefDSL
  26. final def many[T](implicit arg0: reflection.universe.RuntimeDIUniverse.Tag[T], pos: CodePositionMaterializer): SetDSL[T]

    Multibindings are useful for implementing event listeners, plugins, hooks, http routes, etc.

    Multibindings are useful for implementing event listeners, plugins, hooks, http routes, etc.

    To define a multibinding use .many and .add methods in ModuleDef DSL:

    import cats.effect._, org.http4s._, org.http4s.dsl.io._, scala.concurrent.ExecutionContext.Implicits.global
    import distage._
    
    object HomeRouteModule extends ModuleDef {
      many[HttpRoutes[IO]].add {
        HttpRoutes.of[IO] { case GET -> Root / "home" => Ok(s"Home page!") }
      }
    }

    Multibindings defined in different modules will be merged together into a single Set. You can summon a multibinding by type Set[_]:

    import cats.implicits._, import org.http4s.server.blaze._, import org.http4s.implicits._
    
    object BlogRouteModule extends ModuleDef {
      many[HttpRoutes[IO]].add {
        HttpRoutes.of[IO] { case GET -> Root / "blog" / post => Ok("Blog post ``$post''!") }
      }
    }
    
    class HttpServer(routes: Set[HttpRoutes[IO]]) {
      val router = routes.foldK
    
      def serve = BlazeBuilder[IO]
        .bindHttp(8080, "localhost")
        .mountService(router, "/")
        .start
    }
    
    val objects = Injector().produce(HomeRouteModule ++ BlogRouteModule)
    val server = objects.get[HttpServer]
    
    val testRouter = server.router.orNotFound
    
    testRouter.run(Request[IO](uri = uri("/home"))).flatMap(_.as[String]).unsafeRunSync
    // Home page!
    
    testRouter.run(Request[IO](uri = uri("/blog/1"))).flatMap(_.as[String]).unsafeRunSync
    // Blog post ``1''!
    Attributes
    protected
    Definition Classes
    AbstractBindingDefDSL
    See also

    Guice wiki on Multibindings: https://github.com/google/guice/wiki/Multibindings

  27. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  28. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  29. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  30. def parent: Option[Locator]
    Definition Classes
    LocatorDefLocator
  31. lazy val plan: OrderedPlan
    Definition Classes
    LocatorDefLocator
  32. final def run[T](function: ProviderMagnet[T]): T

    Run function f filling all the arguments from locator contents.

    Run function f filling all the arguments from locator contents.

    Works similarly to provider bindings.

    Definition Classes
    Locator
    See also

    ProviderMagnet

  33. final def runOption[T](function: ProviderMagnet[T]): Option[T]
    Definition Classes
    Locator
  34. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  35. def toString(): String
    Definition Classes
    AnyRef → Any
  36. def unsafeLookup(key: reflection.universe.RuntimeDIUniverse.DIKey): Option[Any]
    Attributes
    protected
    Definition Classes
    LocatorDefAbstractLocator
  37. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  38. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  39. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @Deprecated @deprecated @throws( classOf[java.lang.Throwable] )
    Deprecated

    (Since version ) see corresponding Javadoc for more information.

Inherited from AbstractLocator

Inherited from Locator

Inherited from AnyRef

Inherited from Any

Ungrouped