Trait

scaldi

OpenInjectable

Related Doc: package scaldi

Permalink

trait OpenInjectable extends Injectable

Exactly the same as Injectable trait, but with all methods made public

Linear Supertypes
Injectable, Wire, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. OpenInjectable
  2. Injectable
  3. Wire
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. val by: ByWord

    Permalink

    Convenience field to make the injection look more readable when used with default values for the injection.

    Convenience field to make the injection look more readable when used with default values for the injection.

    Example: inject [Database] (by default defaultDb)

    Definition Classes
    OpenInjectableInjectable
  6. implicit def canBeIdentifiedToConstraints[T](target: T)(implicit arg0: CanBeIdentifier[T]): InjectConstraints[Nothing]

    Permalink

    Implicit cast of classes that can be identifiers to an InjectConstraints with the identified as a first element.

    Implicit cast of classes that can be identifiers to an InjectConstraints with the identified as a first element.

    Often used when a list of identifiers should be passed (for example for inject(constraint) method).

    This lets us to put the identifier in a first place to make the parameters look readable.

    T

    type that qualifies as an identifier

    target

    Instance of a class that qualifies as an identifier

    returns

    InjectConstraints

    Definition Classes
    OpenInjectableInjectable
  7. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  9. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  10. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  12. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  13. val identified: IdentifiedWord[Nothing]

    Permalink

    Convenience field to make the injection look more readable when used with identifiers.

    Convenience field to make the injection look more readable when used with identifiers.

    Example: inject [Database] (identified by 'local)

    Definition Classes
    OpenInjectableInjectable
  14. def inject[T](constraints: ⇒ InjectConstraints[T])(implicit injector: Injector, tt: scala.reflect.api.JavaUniverse.TypeTag[T], nn: NotNothing[T]): T

    Permalink

    Injects a dependency defined by a constraint.

    Injects a dependency defined by a constraint.

    Usually used when there are more than one injections for a defined type T

    Example:

    binding identifiedBy 'host to "hostName"
    val host = inject[String]('host)  // equals to "hostName"
    val db = inject (by default defaultDb) // notice that type `T` is optional in inferred in this case
    T

    type of the injected dependency

    constraints

    constraints helping to define what dependency of the type T to inject (typically an identifier, string or a default value)

    injector

    implicit Injector, should be defined in the scope. It's used to lookup bindings

    tt

    ensures that meta-information if type T is available at the runtime

    nn

    ensures, that type T is not inferred as Nothing by scala compiler, since inject needs to know the actual type at the runtime

    returns

    instance of injected dependency

    Definition Classes
    OpenInjectableInjectable
  15. def inject[T](implicit injector: Injector, tt: scala.reflect.api.JavaUniverse.TypeTag[T], nn: NotNothing[T]): T

    Permalink

    Injects a dependency that was previously defined in a module

    Injects a dependency that was previously defined in a module

    Example: val database = inject [Database] // database can now be used as an instance of Database class

    T

    type of the injected dependency

    injector

    implicit Injector, should be defined in the scope. It's used to lookup bindings

    tt

    ensures that meta-information if type T is available at the runtime

    nn

    ensures, that type T is not inferred as Nothing by scala compiler, since inject needs to know the actual type at the runtime

    returns

    instance of injected dependency

    Definition Classes
    OpenInjectableInjectable
  16. def injectAll(identifiers: Identifier*)(implicit injector: Injector): List[Any]

    Permalink

    Injects all dependencies that are defined by identifiers.

    Injects all dependencies that are defined by identifiers.

    identifiers

    identifiers that were defined in module for requested injections

    injector

    implicit Injector, should be defined in the scope. It's used to lookup bindings

    returns

    a list of injected instances defined by identifiers

    Definition Classes
    OpenInjectableInjectable
  17. def injectAllOfType[T](identifiers: Identifier*)(implicit injector: Injector, tt: scala.reflect.api.JavaUniverse.TypeTag[T], nn: NotNothing[T]): List[T]

    Permalink

    Inject all dependencies of type T that were defined in a module and that are defined by supplied identifiers.

    Inject all dependencies of type T that were defined in a module and that are defined by supplied identifiers.

    T

    type of the injected dependency

    identifiers

    identifiers that were defined in module for requested injections

    injector

    implicit Injector, should be defined in the scope. It's used to lookup bindings

    tt

    ensures that meta-information if type T is available at the runtime

    nn

    ensures, that type T is not inferred as Nothing by scala compiler, since inject needs to know the actual type at the runtime

    returns

    a list of injected instances satisfying the type T constraint and identifiers

    Definition Classes
    OpenInjectableInjectable
  18. def injectAllOfType[T](implicit injector: Injector, tt: scala.reflect.api.JavaUniverse.TypeTag[T], nn: NotNothing[T]): List[T]

    Permalink

    Inject all dependencies of type T that were defined in a module.

    Inject all dependencies of type T that were defined in a module.

    T

    type of the injected dependency

    injector

    implicit Injector, should be defined in the scope. It's used to lookup bindings

    tt

    ensures that meta-information if type T is available at the runtime

    nn

    ensures, that type T is not inferred as Nothing by scala compiler, since inject needs to know the actual type at the runtime

    returns

    a list of injected instances satisfying the type T constraint

    Definition Classes
    OpenInjectableInjectable
  19. def injectProvider[T](constraints: ⇒ InjectConstraints[T])(implicit injector: Injector, tt: scala.reflect.api.JavaUniverse.TypeTag[T], nn: NotNothing[T]): () ⇒ T

    Permalink

    Injects a dependency (defined by a constraint) that was previously defined as a provider in a module.

    Injects a dependency (defined by a constraint) that was previously defined as a provider in a module.

    Usually used when there are more than one provider for a defined type T.

    T

    type of the injected dependency

    constraints

    constraints helping to define what dependency of type T to inject (typically an identifier, string or a default value)

    injector

    implicit Injector, should be defined in the scope. It's used to lookup bindings

    tt

    ensures that meta-information if type T is available at the runtime

    nn

    ensures, that type T is not inferred as Nothing by scala compiler, since inject needs to know the actual type at the runtime

    returns

    a new instance of injected dependency

    Definition Classes
    OpenInjectableInjectable
  20. def injectProvider[T](implicit injector: Injector, tt: scala.reflect.api.JavaUniverse.TypeTag[T], nn: NotNothing[T]): () ⇒ T

    Permalink

    Injects a dependency that was previously defined as a provider in a module

    Injects a dependency that was previously defined as a provider in a module

    T

    type of the injected dependency

    injector

    implicit Injector, should be defined in the scope. It's used to lookup bindings

    tt

    ensures that meta-information if type T is available at the runtime

    nn

    ensures, that type T is not inferred as Nothing by scala compiler, since inject needs to know the actual type at the runtime

    returns

    a new instance of injected dependency

    Definition Classes
    OpenInjectableInjectable
  21. def injectWithConstructorDefault[T, C](paramName: String)(implicit injector: Injector, tt: scala.reflect.api.JavaUniverse.TypeTag[T], ct: scala.reflect.api.JavaUniverse.TypeTag[C]): T

    Permalink

    Injects a dependency defined by type T.

    Injects a dependency defined by type T. If dependency is not found, initializes it with the default value from the constructor of type T.

    This implies, that constructor must have one constructor with parameter paramName which has a default value. Method is part of injected macro implementation and not intended to be used outside of it.

    Uses reflection.

    T

    type of the injected dependency

    C

    class of constructor in case dependency cannot be found by T identifier

    paramName

    name of the constructor argument with a default value

    injector

    implicit Injector, should be defined in the scope. It's used to lookup bindings

    tt

    ensures that meta-information if type T is available at the runtime

    ct

    ensures that meta-information if type C is available at the runtime

    returns

    instance of injected dependency. If not found by, initializes one using constructor C

    Definition Classes
    OpenInjectableInjectable
  22. def injectWithDefault[T](injector: Injector, default: ⇒ T)(identifiers: List[Identifier]): T

    Permalink

    Setup an injection that returns default value if an injection with supplied identifiers is not found.

    Setup an injection that returns default value if an injection with supplied identifiers is not found.

    T

    type of the injected dependency

    injector

    current Injector, used to lookup bindings

    default

    default value to return in case injection is not found

    identifiers

    identifiers that define requested injection

    returns

    injection defined by identifiers or default value if injection is not found

    Definition Classes
    OpenInjectableInjectable
  23. macro def injected[T](overrides: Tuple2[String, _]*): T

    Permalink
    Definition Classes
    Wire
  24. macro def injected[T](overrides: Tuple2[Symbol, _]*): T

    Permalink
    Definition Classes
    Wire
  25. macro def injected[T]: T

    Permalink
    Definition Classes
    Wire
  26. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  27. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  28. def noBindingFound(identifiers: List[Identifier]): Nothing

    Permalink

    Helper method for throwing a readable exception when a binding could not be found.

    Helper method for throwing a readable exception when a binding could not be found.

    identifiers

    a list of identifiers

    Definition Classes
    OpenInjectableInjectable
  29. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  30. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  31. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  32. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  33. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  34. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  35. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Injectable

Inherited from Wire

Inherited from AnyRef

Inherited from Any

Ungrouped