Binder

wvlet.airframe.Binder
See theBinder companion object
class Binder[A](val design: Design, val from: Surface, val sourceCode: SourceCode)

Attributes

Companion
object
Graph
Supertypes
trait LogSupport
trait LazyLogger
trait LoggingMethods
trait Serializable
class Object
trait Matchable
class Any
Show all

Members list

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.

Attributes

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]

Attributes

Inherited methods

inline protected def debug(inline message: Any, inline cause: Throwable): Unit

Attributes

Inherited from:
LoggingMethods
inline protected def debug(inline message: Any): Unit

Attributes

Inherited from:
LoggingMethods
inline protected def error(inline message: Any, inline cause: Throwable): Unit

Attributes

Inherited from:
LoggingMethods
inline protected def error(inline message: Any): Unit

Attributes

Inherited from:
LoggingMethods
inline protected def info(inline message: Any, inline cause: Throwable): Unit

Attributes

Inherited from:
LoggingMethods
inline protected def info(inline message: Any): Unit

Attributes

Inherited from:
LoggingMethods
inline protected def logAt(inline logLevel: LogLevel, inline message: Any): Unit

Attributes

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

Attributes

Inherited from:
BinderImpl (hidden)
inline def toEagerSingletonOf[B <: A]: DesignWithContext[B]

Attributes

Inherited from:
BinderImpl (hidden)
inline def toEagerSingletonProvider[D1, D2, D3, D4, D5](factory: (D1, D2, D3, D4, D5) => A): DesignWithContext[A]

Attributes

Inherited from:
BinderImpl (hidden)
inline def toEagerSingletonProvider[D1, D2, D3, D4](factory: (D1, D2, D3, D4) => A): DesignWithContext[A]

Attributes

Inherited from:
BinderImpl (hidden)
inline def toEagerSingletonProvider[D1, D2, D3](factory: (D1, D2, D3) => A): DesignWithContext[A]

Attributes

Inherited from:
BinderImpl (hidden)
inline def toEagerSingletonProvider[D1, D2](factory: (D1, D2) => A): DesignWithContext[A]

Attributes

Inherited from:
BinderImpl (hidden)
inline def toEagerSingletonProvider[D1](factory: D1 => A): DesignWithContext[A]

Attributes

Inherited from:
BinderImpl (hidden)
inline def toProvider[D1, D2, D3, D4, D5](factory: (D1, D2, D3, D4, D5) => A): DesignWithContext[A]

Attributes

Inherited from:
BinderImpl (hidden)
inline def toProvider[D1, D2, D3, D4](factory: (D1, D2, D3, D4) => A): DesignWithContext[A]

Attributes

Inherited from:
BinderImpl (hidden)
inline def toProvider[D1, D2, D3](factory: (D1, D2, D3) => A): DesignWithContext[A]

Attributes

Inherited from:
BinderImpl (hidden)
inline def toProvider[D1, D2](factory: (D1, D2) => A): DesignWithContext[A]

Attributes

Inherited from:
BinderImpl (hidden)
inline def toProvider[D1](factory: D1 => A): DesignWithContext[A]

Attributes

Inherited from:
BinderImpl (hidden)
inline protected def trace(inline message: Any, inline cause: Throwable): Unit

Attributes

Inherited from:
LoggingMethods
inline protected def trace(inline message: Any): Unit

Attributes

Inherited from:
LoggingMethods
inline protected def warn(inline message: Any, inline cause: Throwable): Unit

Attributes

Inherited from:
LoggingMethods
inline protected def warn(inline message: Any): Unit

Attributes

Inherited from:
LoggingMethods

Concrete fields

val design: Design
val from: Surface
val sourceCode: SourceCode