Packages

p

izumi.distage

constructors

package constructors

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. constructors
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Package Members

  1. package macros

Type Members

  1. sealed trait AnyConstructorBase[T] extends ClassConstructorOptionalMakeDSL[T]
  2. final class ClassConstructor[T] extends AnyVal with AnyConstructorBase[T]

    An implicitly summonable constructor for a concrete class T

    An implicitly summonable constructor for a concrete class T

    returns

    izumi.distage.model.providers.Functoid[T] value

    Example:
    1. import distage.{ClassConstructor, Functoid, Injector, ModuleDef}
      
      class A(val i: Int)
      
      val constructor: Functoid[A] = ClassConstructor[A]
      
      val lifecycle = Injector().produceGet[A](new ModuleDef {
        make[A].from(constructor)
        make[Int].fromValue(5)
      })
      
      lifecycle.use {
        (a: A) =>
          println(a.i)
      }
  3. final class FactoryConstructor[T] extends AnyVal with AnyConstructorBase[T]

    An implicitly summonable constructor for a "factory-like" trait or abstract class T

    An implicitly summonable constructor for a "factory-like" trait or abstract class T

    returns

    izumi.distage.model.providers.Functoid[T] value

    See also

    Auto-Factories feature

    izumi.distage.model.definition.impl recommended documenting annotation for use with FactoryConstructor

  4. final class TraitConstructor[T] extends AnyVal with AnyConstructorBase[T]

    An implicitly summonable constructor for a traits or abstract class T

    An implicitly summonable constructor for a traits or abstract class T

    returns

    izumi.distage.model.providers.Functoid[T] value

    See also

    Auto-Traits feature

    izumi.distage.model.definition.impl recommended documenting annotation for use with TraitConstructor

  5. final class ZEnvConstructor[T] extends AnyVal with AnyConstructorBase[ZEnvironment[T]]

    An implicitly summonable constructor for a ZEnvironment[A & B & C]

    An implicitly summonable constructor for a ZEnvironment[A & B & C]

    zio.ZEnvironment heterogeneous map values may be used by ZIO or other Reader-like effects

    See also

    ZIO Environment bindings

Deprecated Type Members

  1. type AnyConstructor[T] = ClassConstructor[T]

    Annotations
    @deprecated
    Deprecated

    Removed since 1.2.0. Use ClassConstructor instead.

Deprecated Value Members

  1. lazy val AnyConstructor: ClassConstructor.type
    Annotations
    @deprecated
    Deprecated

    Removed since 1.2.0. Use ClassConstructor instead.

Inherited from AnyRef

Inherited from Any

Ungrouped