Injector

class Injector(injections: Injection<Annotation, Any>) : BeanPostProcessor

An Injector is responsible for the complete dependency injection of target objects. Basically, it performs two tasks:

  • It serves as a registry for Injections.

  • It performs the injection of resources into a target object.

Constructors

Link copied to clipboard
constructor(vararg injections: Injection<Annotation, Any>)

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
fun inject(targetObject: Any, context: Any)

Performs the dependency injection for the given target object.

Link copied to clipboard
open override fun postProcessAfterInitialization(bean: Any, beanName: String): Any
Link copied to clipboard
open override fun postProcessBeforeInitialization(bean: Any, beanName: String): Any
Link copied to clipboard

Registers a dependency injector for the given annotation type. The manager will use this injector for a given object if there are fields in the object's class with annotation of this annotation type.