Packages

abstract class Injector extends AnyRef

An injector used within Finatra.

This is abstract class to allow for two implementations:

- production injector, created via Injector.apply and - test injector, created via TestInjector.apply

DO NOT EXTEND this class on your own.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Injector
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new Injector()
    Attributes
    protected[inject]

Abstract Value Members

  1. abstract def instance[T](key: Key[T]): T

    Returns the appropriate instance for the given injection key.

    Returns the appropriate instance for the given injection key.

    When feasible, avoid using this method in favor of having the Injector inject your dependencies ahead of time via annotating your constructor with @Inject.

    T

    type of the bound instance to return from the object graph.

    key

    com.google.inject.Key binding key of the bound instance to return from the object graph.

    returns

    bound instance of type T represented by com.google.inject.Key key.

    See also

    com.google.inject.Key

  2. abstract def instance[T, Ann <: Annotation](clazz: Class[T], annotationClazz: Class[Ann]): T

    Returns the appropriate instance for the given key constructed from the passed class and given java.lang.annotation.Annotation class.

    Returns the appropriate instance for the given key constructed from the passed class and given java.lang.annotation.Annotation class.

    T

    type of the bound instance to return from the object graph.

    Ann

    type of the annotation class used to disambiguate the bound type T.

    clazz

    the class of type T of the bound instance to return from the object graph.

    annotationClazz

    java.lang.annotation.Annotation class used to disambiguate the bound type T.

    returns

    bound instance of type T.

  3. abstract def instance[T](clazz: Class[T], annotation: Annotation): T

    Returns the appropriate instance for the given key constructed from the passed class and given java.lang.annotation.Annotation annotation.

    Returns the appropriate instance for the given key constructed from the passed class and given java.lang.annotation.Annotation annotation.

    When feasible, avoid using this method, in favor of having the Injector inject your dependencies ahead of time via annotating your constructor with @Inject.

    T

    type of the bound instance to return from the object graph.

    clazz

    the class of type T of the bound instance to return from the object graph.

    annotation

    java.lang.annotation.Annotation instance used to disambiguate the bound type T.

    returns

    bound instance of type T.

  4. abstract def instance[T](clazz: Class[T]): T

    Returns the appropriate instance for the given injection type.

    Returns the appropriate instance for the given injection type.

    When feasible, avoid using this method, in favor of having the Injector inject your dependencies ahead of time via annotating your constructor with @Inject.

    T

    type of the bound instance to return from the object graph.

    clazz

    the class of type T of the bound instance to return from the object graph.

    returns

    bound instance of type T.

  5. abstract def instance[T](annotationClazz: Class[_ <: Annotation])(implicit arg0: scala.reflect.api.JavaUniverse.TypeTag[T]): T

    Returns the appropriate instance for the given key constructed from the passed type T and given java.lang.annotation.Annotation class.

    Returns the appropriate instance for the given key constructed from the passed type T and given java.lang.annotation.Annotation class.

    When feasible, avoid using this method in favor of having the Injector inject your dependencies ahead of time via annotating your constructor with @Inject.

    T

    type of the bound instance to return from the object graph.

    annotationClazz

    class of java.lang.annotation.Annotation used to disambiguate the bound type T.

    returns

    bound instance of type T annotated with annotation class.

  6. abstract def instance[T](annotation: Annotation)(implicit arg0: scala.reflect.api.JavaUniverse.TypeTag[T]): T

    Returns the appropriate instance for the given key constructed from the passed type T and given java.lang.annotation.Annotation annotation.

    Returns the appropriate instance for the given key constructed from the passed type T and given java.lang.annotation.Annotation annotation.

    When feasible, avoid using this method in favor of having the Injector inject your dependencies ahead of time via annotating your constructor with @Inject.

    T

    type of the bound instance to return from the object graph.

    annotation

    java.lang.annotation.Annotation instance used to disambiguate the bound type T.

    returns

    bound instance of type T annotated with annotation.

  7. abstract def instance[T, Ann <: Annotation](implicit arg0: scala.reflect.api.JavaUniverse.TypeTag[T], arg1: ClassTag[Ann]): T

    Returns the appropriate instance for the given key constructed from the passed type T and given java.lang.annotation.Annotation type Ann.

    Returns the appropriate instance for the given key constructed from the passed type T and given java.lang.annotation.Annotation type Ann.

    When feasible, avoid using this method in favor of having the Injector inject your dependencies ahead of time via annotating your constructor with @Inject.

    T

    type of the bound instance to return from the object graph.

    Ann

    type of the annotation used to disambiguate the bound type T.

    returns

    bound instance of type T annotated with annotation type Ann.

  8. abstract def instance[T](implicit arg0: scala.reflect.api.JavaUniverse.TypeTag[T]): T

    Returns the appropriate instance for the given key constructed from the passed type T.

    Returns the appropriate instance for the given key constructed from the passed type T.

    When feasible, avoid using this method in favor of having the Injector inject your dependencies ahead of time via annotating your constructor with @Inject.

    T

    type of the bound instance to return from the object graph.

    returns

    bound instance of type T.

  9. abstract def underlying: google.inject.Injector

    Returns the underlying Guice injector.

  10. abstract def instance[T](name: String)(implicit arg0: scala.reflect.api.JavaUniverse.TypeTag[T]): T

    Returns the appropriate instance for the given key constructed from the passed type T and given String name which is interpreted to be the value of a @Named annotation.

    Returns the appropriate instance for the given key constructed from the passed type T and given String name which is interpreted to be the value of a @Named annotation.

    When feasible, avoid using this method in favor of having the Injector inject your dependencies ahead of time via annotating your constructor with @Inject.

    T

    type of the bound instance to return from the object graph.

    name

    String value of @Named annotation.

    returns

    bound instance of type T annotated with @Named(name).

    Annotations
    @deprecated
    Deprecated

    (Since version 2017-09-25) Users should prefer injector.instance[T](java.lang.annotation.Annotation

    See also

    com.google.inject.name.Named

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  8. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  9. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  10. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  11. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  12. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  13. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  14. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  15. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  16. def toString(): String
    Definition Classes
    AnyRef → Any
  17. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  18. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  19. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()

Inherited from AnyRef

Inherited from Any

Ungrouped