Binder

class Binder[A](val design: Design, val from: Surface, val sourceCode: SourceCode) extends BinderImpl[A]
Companion
object
trait BinderImpl[A]
trait LogSupport
trait LazyLogger
trait LoggingMethods
trait Serializable
class Object
trait Matchable
class Any

Value members

Concrete methods

def afterStart(body: A => Unit): DesignWithContext[A]
def beforeShutdown(body: A => Unit): DesignWithContext[A]
def onInit(body: A => Unit): DesignWithContext[A]
def onInject(body: A => Unit): DesignWithContext[A]
def onShutdown(body: A => Unit): DesignWithContext[A]
def onStart(body: A => Unit): DesignWithContext[A]
def toInstance(any: => A): DesignWithContext[A]

Bind the type to a given instance. The instance will be instantiated as an eager singleton when creating a session. Note that as you create a new session, new instance will be generated.

Bind the type to a given instance. The instance will be instantiated as an eager singleton when creating a session. Note that as you create a new session, new instance will be generated.

def toLazyInstance(any: => A): DesignWithContext[A]

Bind an instance lazily (no singleton). This is used internally for implementing bindFactory[I1 => A]

Bind an instance lazily (no singleton). This is used internally for implementing bindFactory[I1 => A]

Inherited methods

inline protected def debug(inline message: Any, inline cause: Throwable): Unit
Inherited from
LoggingMethods
inline protected def debug(inline message: Any): Unit
Inherited from
LoggingMethods
inline protected def error(inline message: Any, inline cause: Throwable): Unit
Inherited from
LoggingMethods
inline protected def error(inline message: Any): Unit
Inherited from
LoggingMethods
inline protected def info(inline message: Any, inline cause: Throwable): Unit
Inherited from
LoggingMethods
inline protected def info(inline message: Any): Unit
Inherited from
LoggingMethods
inline protected def logAt(inline logLevel: LogLevel, inline message: Any): Unit
Inherited from
LoggingMethods
inline def to[B <: A]: DesignWithContext[B]

Bind a singleton instance of B to A

Bind a singleton instance of B to A

Inherited from
BinderImpl
inline def toEagerSingletonOf[B <: A]: DesignWithContext[B]
Inherited from
BinderImpl
inline def toEagerSingletonProvider[D1, D2, D3, D4, D5](factory: (D1, D2, D3, D4, D5) => A): DesignWithContext[A]
Inherited from
BinderImpl
inline def toEagerSingletonProvider[D1, D2, D3, D4](factory: (D1, D2, D3, D4) => A): DesignWithContext[A]
Inherited from
BinderImpl
inline def toEagerSingletonProvider[D1, D2, D3](factory: (D1, D2, D3) => A): DesignWithContext[A]
Inherited from
BinderImpl
inline def toEagerSingletonProvider[D1, D2](factory: (D1, D2) => A): DesignWithContext[A]
Inherited from
BinderImpl
inline def toEagerSingletonProvider[D1](factory: D1 => A): DesignWithContext[A]
Inherited from
BinderImpl
inline def toProvider[D1, D2, D3, D4, D5](factory: (D1, D2, D3, D4, D5) => A): DesignWithContext[A]
Inherited from
BinderImpl
inline def toProvider[D1, D2, D3, D4](factory: (D1, D2, D3, D4) => A): DesignWithContext[A]
Inherited from
BinderImpl
inline def toProvider[D1, D2, D3](factory: (D1, D2, D3) => A): DesignWithContext[A]
Inherited from
BinderImpl
inline def toProvider[D1, D2](factory: (D1, D2) => A): DesignWithContext[A]
Inherited from
BinderImpl
inline def toProvider[D1](factory: D1 => A): DesignWithContext[A]
Inherited from
BinderImpl
inline protected def trace(inline message: Any, inline cause: Throwable): Unit
Inherited from
LoggingMethods
inline protected def trace(inline message: Any): Unit
Inherited from
LoggingMethods
inline protected def warn(inline message: Any, inline cause: Throwable): Unit
Inherited from
LoggingMethods
inline protected def warn(inline message: Any): Unit
Inherited from
LoggingMethods

Concrete fields

val from: Surface
val sourceCode: SourceCode