Packages

class TracingGcModule extends BootstrapModuleDef

Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. TracingGcModule
  2. BootstrapModuleDef
  3. ModuleDefDSL
  4. TagsDSL
  5. IncludesDSL
  6. AbstractBindingDefDSL
  7. BootstrapModule
  8. ModuleBase
  9. AnyRef
  10. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new TracingGcModule(roots: Set[model.reflection.universe.RuntimeDIUniverse.DIKey])

Type Members

  1. abstract type Self <: BootstrapModule
    Definition Classes
    BootstrapModuleModuleBase

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. def _initialIncludes: ArrayBuffer[Include]
    Attributes
    protected
    Definition Classes
    IncludesDSL
  5. def _initialState: ArrayBuffer[BindingRef]
    Attributes
    protected
    Definition Classes
    AbstractBindingDefDSL
  6. def _initialTaggedIncludes: ArrayBuffer[IncludeApplyTags]
    Attributes
    protected
    Definition Classes
    IncludesDSL
  7. def _initialTags: Set[BindingTag]
    Attributes
    protected
    Definition Classes
    TagsDSL
  8. final def addImplicit[T](name: String)(implicit arg0: model.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
  9. final def addImplicit[T](implicit arg0: model.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
  10. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  11. def bindings: Set[Binding]
    Definition Classes
    ModuleDefDSL
  12. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate() @throws( ... )
  13. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  14. def equals(obj: Any): Boolean
    Definition Classes
    ModuleBase → AnyRef → Any
  15. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  16. def hashCode(): Int
    Definition Classes
    ModuleBase → AnyRef → Any
  17. final def include(that: ModuleBase): Unit

    Add all bindings in that module into this module

    Add all bindings in that module into this module

    WON'T add global tags from TagsDSL#tag to included bindings.

    Attributes
    protected
    Definition Classes
    IncludesDSL
  18. final def includeApplyTags(that: ModuleBase): Unit

    Add all bindings in that module into this module

    Add all bindings in that module into this module

    WILL add global tags from TagsDSL#tag to included bindings.

    Attributes
    protected
    Definition Classes
    IncludesDSL
  19. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  20. final def keys: Set[model.reflection.universe.RuntimeDIUniverse.DIKey]
    Definition Classes
    ModuleBase
  21. final def make[T](implicit arg0: model.reflection.universe.RuntimeDIUniverse.Tag[T], pos: CodePositionMaterializer): BindDSL[T]
    Attributes
    protected
    Definition Classes
    AbstractBindingDefDSL
  22. final def many[T](implicit arg0: model.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

  23. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  24. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  25. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  26. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  27. final def tag(tags: BindingTag*): Unit

    Add tags to all bindings in this module, except included bindings

    Add tags to all bindings in this module, except included bindings

    Attributes
    protected
    Definition Classes
    TagsDSL
  28. def toString(): String
    Definition Classes
    ModuleBase → AnyRef → Any
  29. final def todo[T](implicit arg0: model.reflection.universe.RuntimeDIUniverse.Tag[T], pos: CodePositionMaterializer): Unit

    Create a dummy binding that throws an exception with an error message when it's created.

    Create a dummy binding that throws an exception with an error message when it's created.

    Useful for prototyping.

    Attributes
    protected
    Definition Classes
    ModuleDefDSL
  30. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  31. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  32. 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 BootstrapModuleDef

Inherited from ModuleDefDSL

Inherited from TagsDSL

Inherited from IncludesDSL

Inherited from BootstrapModule

Inherited from ModuleBase

Inherited from AnyRef

Inherited from Any

Ungrouped