- Major changes to the internal model the injector uses
- Merge all subtypes of Handler into one class (
Handler
) so that it can be easily understood and extended - Rename
Instantiation
toResolution
- Dependencies are now defined with an
ObjectIdentifier
instance, which in the future should allow for more features and customizations (especially in regards of supporting more annotations and generics)
- Merge all subtypes of Handler into one class (
- Create injectable types
Factory<T>
andSingletonStore<T>
to easily handle instances of a given type - Separate injector project into two modules: injector (core), and injector-extras for additional handlers
- Fix Java 9 compatibility by adding dependency to
javax.annotation-api
(@PostConstruct
annotation not shipped with the JDK 9)
- Default behavior conforms more to
@Inject
Javadoc- Inheritance support:
@Inject
fields on super classes are now injected - By default,
DefaultInjectionProvider
is used, which does not allow static fields to be injected, nor may field injection be used in a class that has an@Inject
constructor. UseStandardInjectionProvider
if you want to make use of these features (closer to the@Inject
Javadoc specification).
- Inheritance support:
- Improve handler interfaces
- Revise signatures
- Add instantiation context (holds contextual information about the class requested to be instantiated)
- Annotation support for "Create if has dependencies" feature
- Possibility to cache instantiation methods: see
InstantiationCache
(not included by default, see Javadoc)
- Allow to supply
Provider
types for custom instantiation - Implement injection of
Provider
into other classes - Fix test runner to allow multiple
@InjectMocks
fields in one test class - Add new injector method:
createIfHasDependencies
- Calling
Injector#newInstance
also goes through all PreConstructHandlers first
- Add
@NoMethodScan
and@NoFieldScan
to preventNoClassDefFoundError
in classes using an optional dependency - Throw exception in default injection providers if
@Inject
is present on multiple members of different type
- Initial commit — create injector logic
- Implement handler architecture to allow custom behavior