Trait

com.phylage.scaladia.injector

RefreshInjection

Related Doc: package injector

Permalink

trait RefreshInjection extends Injector

Used to repool auto-injectable objects present in the current classpath.

Basic injection needs to be executed in the module to be started first. The declaration injected in the library has already completed macro expansion.

That is, when a third-party object accessed without injection tries to inject someone for the first time, higher priority objects in the current classpath may be ignored.

At that time, by inheriting RefreshInjection at a higher level, AutoInjectable in the class path will be pooled again.

Linear Supertypes
Injector, ContainerAccessible[Container], AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. RefreshInjection
  2. Injector
  3. ContainerAccessible
  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. implicit var _cntMutation: Container

    Permalink
    Definition Classes
    Injector → ContainerAccessible
  5. implicit def _ijp: InjectionPool

    Permalink

    Implicitly injection pool

    Implicitly injection pool

    Attributes
    protected
    Definition Classes
    ContainerAccessible
  6. implicit def _implicitProviding[X](variable: Lazy[X]): X

    Permalink

    Provide dependency.

    Provide dependency.

    X

    Variable type

    variable

    Stored dependency object.

    Definition Classes
    ContainerAccessible
  7. implicit def _someoneNeeds: Accessor[_]

    Permalink

    This refers to itself

    This refers to itself

    Attributes
    protected
    Definition Classes
    ContainerAccessible
  8. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  9. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  10. macro def confirm[T](implicit ctn: Container, ip: InjectionPool, access: Accessor[_]): T

    Permalink

    Get accessible dependencies.

    Get accessible dependencies. You can detect errors that can not be assigned at compile time.

    It is faster than com.phylage.scaladia.injector.ContainerAccessible.inject because of immediate assignment, but the dependency injected at compile time is determined, and this assignment can not be overwritten with "flush" or "narrow".

    The scope to which this immediate assignment applies is all the same instances that inherit com.phylage.scaladia.injector.AutoInjectable.

    T

    Injection type

    ctn

    Container

    access

    Accessor (This refers to itself)

    Attributes
    protected
    Definition Classes
    ContainerAccessible
  11. final def eq(arg0: AnyRef): Boolean

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

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

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  16. macro def inject[T](implicit ctn: Container, ip: InjectionPool, access: Accessor[_]): Lazy[T]

    Permalink

    Get accessible dependencies.

    Get accessible dependencies.

    The type information is resolved at compile time, but the injection object is finalized at runtime. This function is slower than com.phylage.scaladia.injector.ContainerAccessible.confirm, but can be overwritten by flush or narrow.

    T

    Injection type

    ctn

    Container

    access

    Accessor (This refers to itself)

    Attributes
    protected
    Definition Classes
    ContainerAccessible
  17. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  18. def narrow[T](x: T, priority: Int = Int.MaxValue)(implicit arg0: scala.reflect.api.JavaUniverse.WeakTypeTag[T], ctn: Container): Indexer[T]

    Permalink

    Gets an indexer for registering new dependencies.

    Gets an indexer for registering new dependencies. By default, the dependency priority is set to maximum.

    T

    new dependency type

    x

    new dependency

    priority

    Injection priority.

    Attributes
    protected
    Definition Classes
    ContainerAccessible
  19. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  20. final def notify(): Unit

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

    Permalink
    Definition Classes
    AnyRef
  22. def overwrite[T](x: T, priority: Int = 1100)(implicit arg0: scala.reflect.api.JavaUniverse.WeakTypeTag[T], ctn: Container): Unit

    Permalink

    Manually register the new dependency.

    Manually register the new dependency.

    T

    new dependency type

    x

    new dependency.

    priority

    Injection priority.

    Definition Classes
    ContainerAccessible
  23. macro def reify[T](fun: T)(implicit ctn: Container, ip: InjectionPool): T

    Permalink

    Instantiates injectable objects and updates the pool with the current classpath.

    Instantiates injectable objects and updates the pool with the current classpath. For example, if this is

    inject[Runner].execute

    , you do not need reify.

    object Main extends App with RefreshInjection {
      reify {
        // Runner is an external dependency module.
        // The call to inject[X] internally, the implementation class of X is in the first-party module.
        println(Runner.execute)
      }
    }

    inject[Runner].execute }}}

    object Main extends App with RefreshInjection {
      reify {
        // Runner is an external dependency module.
        // The call to inject[X] internally, the implementation class of X is in the first-party module.
        println(Runner.execute)
      }
    }
    T

    result type

    fun

    any function

  24. def shade[T](ctx: (LocalizedContainer) ⇒ T): T

    Permalink

    Create a container shade.

    Create a container shade.

    T

    Result type

    ctx

    Shaded container function.

    Definition Classes
    ContainerAccessible
  25. final def synchronized[T0](arg0: ⇒ T0): T0

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

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

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

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

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

Inherited from Injector

Inherited from ContainerAccessible[Container]

Inherited from AnyRef

Inherited from Any

Ungrouped