AbstractFunctoid

izumi.distage.model.providers.AbstractFunctoid
trait AbstractFunctoid[+A, Ftoid <: ([X] =>> AbstractFunctoid[X, Ftoid])]

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class Functoid[A]

Members list

Value members

Abstract methods

protected def create[B](provider: Provider): Ftoid[B]
def get: Provider

Concrete methods

def addDependencies(keys: Iterable[DIKey]): Ftoid[A]
def addDependency[B : Tag]: Ftoid[A]

Add B as an unused dependency of this Functoid

Add B as an unused dependency of this Functoid

Attributes

def addDependency[B : Tag](name: Identifier): Ftoid[A]
def addDependency(key: DIKey): Ftoid[A]
def annotateAllParameters(name: Identifier): Ftoid[A]

Add an @Id(name) annotation to all unannotated parameters

Add an @Id(name) annotation to all unannotated parameters

Attributes

def annotateParameter[P : Tag](name: Identifier): Ftoid[A]

Add an @Id annotation to an unannotated parameter P, e.g. for .annotateParameterP, transform lambda (p: P) => x(p) into (p: P @Id("my-id")) => x(p)

Add an @Id annotation to an unannotated parameter P, e.g. for .annotateParameterP, transform lambda (p: P) => x(p) into (p: P @Id("my-id")) => x(p)

Attributes

Throws
ParameterNotFoundForAnnotation

if there's no unannotated parameter p: P in functoid

def annotateParameterIfExists[P : Tag](name: Identifier): Ftoid[A]

Add an @Id annotation to an unannotated parameter P, e.g. for .annotateParameterP, transform lambda (p: P) => x(p) into (p: P @Id("my-id")) => x(p)

Add an @Id annotation to an unannotated parameter P, e.g. for .annotateParameterP, transform lambda (p: P) => x(p) into (p: P @Id("my-id")) => x(p)

Does nothing if there's no unannotated parameter p: P in functoid

Attributes

def annotateParameterWhen(name: Identifier)(predicate: BasicKey => Boolean): Ftoid[A]

Add an @Id(name) annotation to all parameters matching predicate

Add an @Id(name) annotation to all parameters matching predicate

Attributes

def ap[B, C](that: Ftoid[B])(implicit ev: A <:< (B => C), tag: Tag[C]): Ftoid[C]

Apply a function produced by this Functoid to the argument produced by that Functoid.

Apply a function produced by this Functoid to the argument produced by that Functoid.

Same as

 this.map2(that)((f, a) => f(a))

Attributes

def flatAp[B : Tag](that: Ftoid[A => B]): Ftoid[B]

Applicative's ap method - can be used to chain transformations like flatMap.

Applicative's ap method - can be used to chain transformations like flatMap.

Apply a function produced by that Functoid to the value produced by this Functoid.

Same as

 this.map2(that)((a, f) => f(a))

Attributes

def map[B : Tag](f: A => B): Ftoid[B]
def map2[B, C : Tag](that: Ftoid[B])(f: (A, B) => C): Ftoid[C]
def zip[B](that: Ftoid[B]): Ftoid[(A, B)]