Bali DI for Java 0.11.5
christian-schlichtherle
released this
18 Aug 06:37
·
27 commits
to main
since this release
This release generates local classes with meaningful names instead of anonymous classes for abstract component classes (or interfaces). The generated local classes have the simple name of the class or interface expected to be returned from the module method. Here is an example:
import bali.*
@Module
interface MyModule {
@Make(RealFormatter.class)
Formatter formattter();
}
Let's suppose RealFormatter
is an abstract interface. Now in this release, the annotation processor would generate a local class with the simple name RealFormatter
because that's the type which is expected to be returned from this method as requested by @Make(RealFormatter.class)
.