Package org.wamblee.inject

This package provides a mini-framework for interfacing to existing dependency injection mechanisms.

See:
          Description

Interface Summary
Injector Interface used to perform injection with.
InjectorFactory The injector factory is responsible for creating injectors for a given class.
 

Class Summary
Injectable This abstract base class performs injection at construction.
InjectorBuilder Utility for obtaining an implementation of the InjectorFactory using ServiceLoader and for obtaining a SimpleInjector.
InjectorCache Cache of CdiInjectors for efficiency to avoid duplicate analysis of a given class.
SimpleInjector The main entry point for programmatic dependency injection.
 

Package org.wamblee.inject Description

This package provides a mini-framework for interfacing to existing dependency injection mechanisms. This package does not provide dependency injection, but implementations are expected to implement it, usually by delegating to an existing dependency injection framework. The interfaces in this package provide independence on the actual framework chosen and also allow for better testability.

Users of the package

Users of this package will typically use:

For example, to inject into a given object, use:

   Injector injector = InjectorBuilder.getInjector();
   MyPojo pojo = new MyPojo();
   injector.inject(pojo);
 

Implementors of the package

Of interest to implementations of this package integrating with dependency injection frameworks are:

Class overview



Copyright © 2021. All Rights Reserved.