Releases: pustike/pustike-inject
Releases · pustike/pustike-inject
Release version 2.0.0
- Migrate to Injection API 2.0.0 released as part of Jakarta EE9
- Make
jakarta.inject
module a transitive dependency - Change
toString()
implementation of@Named
annotation to removevalue=
i.e.@jakarta.inject.Named("foo")
instead of@jakarta.inject.Named(value="foo")
. - Updated pustike maven parent version to 0.1.4
- Other general improvements
Release version 1.5.0
- Added
module-info.java
and so it requires Java 11 or higher. - Moved
AnnotationUtils
toutils
package and this is not exported by the module. - Use
AccessibleObject#trySetAccessible
instead ofisAccessible
as this is deprecated. - Changed the build tool from Gradle to Maven
Release version 1.4.2
- Fields and Methods are scanned for injection points, by sorting them using their name and types.
- Fixed: Declaring a binding as Eager Singleton should create the instance when injector is configured.
- Other general improvements.
Release version 1.4.1
General Improvements and bug fixes.
Release version 1.4.0
- New Feature: Events support to allow publish-subscribe style communication between components,
managed by the injector, without requiring them to explicitly register with one another. - Create a SPI (Service Provider Interfaces) package and moved following interfaces from
bind
package:
BindingListener
,InjectionListener
,InjectionPoint
,InjectionPointLoader
. BindingListener
is improved to include theBindingKey
for which a binding has been registered.InjectionPointLoader
changes:- Removed method
createInjectionPoints
which had a cyclic dependency withimpl
package - A function
injectionPointCreator
is passed to the methodgetInjectionPoints
- Removed method
- Fixed a regression introduced in v1.3.0, which ignored
defaultScope
applied in the module. - Added check to ensure that, Bindings can be obtained only after the Injector is fully configured.
- Change
toString()
implementation of@Named
annotation to quote string values when using Java9
Release version 1.3.0
- Added support for optional dependencies using
@Nullable
andOptional<T>
- Added new methods to retrieve optional dependencies from injector:
injector.getIfPresent(type)
andinjector.getIfPresent(key)
- Fixed the issue in configuring MultiBinder when bindings are added from different modules for the same key.
Release version 1.2.0
- Added MultiBinder support to bind multiple values separately, to later inject them as a complete collection. More details are available in javadocs.
- Added methods to
BindingKey
:toListType()
andtoListProviderType()
- Renamed
BindingKey#createProviderKey()
method astoProviderType()
- Fixed the issue in binding a provider when
@Provides
annotation is used on a method in the module - Scan for methods annotated with
@Provides
in module's superclasses also - Fixed the issue which allowed registering bindings to a key more than once.
Release version 1.1.0
- Hierarchical Injector support by creating child injector which delegates all requests for bindings that are not found, to it's parent injector. All bindings in the parent injector are visible to child, but elements of the child injector are not visible to its parent. Following new APIs are introduced:
* Injector#createChildInjector(Module...)
* Injector#createChildInjector(Iterable)
* Injector##getParent() - Added Binder.install(Module) to configure bindings from the given module.
- Bind Module methods annotated with @provides to create provider method bindings.
- Remove SessionScope from test packages as it belongs to pustike-web module
- Update build files to Gradle v4.0 release
Release version 1.0.1
- Provider Bindings: Inject dependencies into provider instance only once.
- Fix Scoped Provider creation issue in a multi-threaded environment by creating it immediately after injector configuration.
- Singleton scope: define instance variable as
volatile
to avoid issues in a multi-threaded environment (derived from Guice). - Singleton scope: Call provider.get() only once even when it returns the instance as null.
- Include Field/Method details in the exception thrown, when failed to inject dependencies.
- Make utils\AnnotationUtils package-private as it contains internal utility methods only.
- Upgrade build to Gradle v3.5
Release version 1.0.0
Initial Public Release