Packages

sealed trait AnyConstructor[T] extends AnyConstructorOptionalMakeDSL[T]

An implicitly summonable constructor for a type T, can generate constructors for:

Since version 1.1.0, does not generate constructors "factory-like" traits and abstract classes, instead use FactoryConstructor.

Use ZEnvConstructor to generate constructors for zio.ZEnvironment values.

returns

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

Example:
  1. import distage.{AnyConstructor, Functoid, Injector, ModuleDef}
    
    class A(val i: Int)
    
    val constructor: Functoid[A] = AnyConstructor[A]
    
    val lifecycle = Injector().produceGet[A](new ModuleDef {
      make[A].from(constructor)
      make[Int].fromValue(5)
    })
    
    lifecycle.use {
      (a: A) =>
        println(a.i)
    }
Linear Supertypes
AnyConstructorOptionalMakeDSL[T], Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. AnyConstructor
  2. AnyConstructorOptionalMakeDSL
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Abstract Value Members

  1. abstract def getClass(): Class[_ <: AnyRef]
    Definition Classes
    Any
  2. abstract def provider: Functoid[T]
    Definition Classes
    AnyConstructor → AnyConstructorOptionalMakeDSL

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    Any
  2. final def ##: Int
    Definition Classes
    Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def equals(arg0: Any): Boolean
    Definition Classes
    Any
  6. def hashCode(): Int
    Definition Classes
    Any
  7. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  8. def toString(): String
    Definition Classes
    Any

Inherited from AnyConstructorOptionalMakeDSL[T]

Inherited from Any

Ungrouped