izumi.distage.constructors

Members list

Concise view

Type members

Classlikes

sealed trait AnyConstructorBase[T]

Attributes

Graph
Supertypes
class Any
Known subtypes
final class ClassConstructor[T](val provider: Functoid[T]) extends AnyVal with AnyConstructorBase[T]

An implicitly summonable constructor for a concrete class T

An implicitly summonable constructor for a concrete class T

Attributes

Returns:

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

Example:
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)
}
Companion:
object
Graph
Supertypes
class AnyVal
trait Matchable
class Any

Attributes

Companion:
class
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
class ConstructorContext[R0, Q <: Quotes, U <: ConstructorUtil[Q]](using val rType: Type[R0], val qctx: Q)(val util: U & ConstructorUtil[Q])

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
class ConstructorUtil[Q <: Quotes](using val qctx: Q)

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
object DebugProperties extends DebugProperties

Java properties that control debug output of izumi.distage.constructors & izumi.distage.model.providers.Functoid macros

Java properties that control debug output of izumi.distage.constructors & izumi.distage.model.providers.Functoid macros

Attributes

See also:
Graph
Supertypes
trait DebugProperties
class Object
trait Matchable
class Any
Self type
final class FactoryConstructor[T](val provider: Functoid[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

Attributes

Returns:

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

See also:

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

Companion:
object
Graph
Supertypes
class AnyVal
trait Matchable
class Any

Attributes

Companion:
class
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
object MakeMacro

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
final class TraitConstructor[T](val provider: Functoid[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

Attributes

Returns:

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

See also:

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

Companion:
object
Graph
Supertypes
class AnyVal
trait Matchable
class Any

Attributes

Companion:
class
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
final class ZEnvConstructor[T](val provider: Functoid[ZEnvironment[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

Attributes

See also:
Companion:
object
Graph
Supertypes
trait AnyConstructorBase[ZEnvironment[T]]
class AnyVal
trait Matchable
class Any

Attributes

Companion:
class
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Deprecated types

Attributes

Deprecated

Since version 1.2.0, default behavior for make[T] changed to not implicitly generate constructors for traits and abstract classes, or for "factory-like" traits and abstract classes, but only for concrete classes. AnyConstructor as a proxy for default behavior of make has been removed in favor of ClassConstructor, since it is the default behavior of make now. It is now recommended to use ClassConstructor, TraitConstructor (Auto-Traits) and FactoryConstructor (Auto-Factories) explicitly instead of using AnyConstructor.

Value members

Deprecated fields

Attributes

Deprecated
true