Design

class Design(val designOptions: DesignOptions, val binding: Vector[Binding], val hooks: Vector[LifeCycleHookDesign]) extends LogSupport with DesignImpl

Immutable airframe design.

Design instance does not hold any duplicate bindings for the same Surface.

Companion
object
trait DesignImpl
trait LogSupport
trait LazyLogger
trait LoggingMethods
trait Serializable
class Object
trait Matchable
class Any

Value members

Concrete methods

def +(other: Design): Design
def add(other: Design): Design
def bind(t: Surface)(implicit sourceCode: SourceCode): Binder[Any]
def canEqual(other: Any): Boolean
override def equals(other: Any): Boolean
Definition Classes
Any
override def hashCode(): Int
Definition Classes
Any

Generates a minimized design by removing overwritten bindings

Generates a minimized design by removing overwritten bindings

Create a new session.

Create a new session.

With this method, the session will not start automatically. You need to explicitly call session.start and session.shutdown to start/terminate the lifecycle of objects

Method for configuring the session in details

Method for configuring the session in details

def remove(t: Surface): Design

Used for casting itself as Design if returning DesignWithContext type is cumbersome

Used for casting itself as Design if returning DesignWithContext type is cumbersome

override def toString: String
Definition Classes
Any

Do not initialize singletons for debugging

Do not initialize singletons for debugging

Enable eager initialization of singletons services for production mode

Enable eager initialization of singletons services for production mode

def withSession[U](body: Session => U): U

Run the code block with a new session.

Run the code block with a new session.

This method will create a new session, start it, run the given code block, and finally terminate the session after the code block completion.

def withStats(stats: DIStats): Design

Use a custom binding tracer

Use a custom binding tracer

Inherited methods

inline def bind[A]: Binder[A]
Inherited from
DesignImpl
inline def build[A](body: A => Any): Any

A helper method of creating a new session and an instance of A. This method is useful when you only need to use A as an entry point of your program. After executing the body, the sesion will be closed.

A helper method of creating a new session and an instance of A. This method is useful when you only need to use A as an entry point of your program. After executing the body, the sesion will be closed.

Inherited from
DesignImpl
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 remove[A]: Design
Inherited from
DesignImpl
inline def run[A, B](body: A => B): B

Execute a given code block by building A using this design, and return B

Execute a given code block by building A using this design, and return B

Inherited from
DesignImpl
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