Commit graph

126 commits

Author SHA1 Message Date
Mike Bierlee 7ba8e545f6 Move context registration related method out of container
Should be still usable as before because of UFCS
2016-12-14 22:04:13 +01:00
Mike Bierlee cc314324a7 Use empty main instead of relying on main generation by compilers
GDC doesn't seem to do this
2016-12-13 22:28:12 +01:00
Mike Bierlee 2f5ffd5da5 Add test for value injection within injectors and their dependencies 2016-12-12 22:51:26 +01:00
Mike Bierlee 7c718ec159 Add tests verifying that dependency injection is performed for value injectors 2016-12-12 22:51:26 +01:00
Mike Bierlee 86fb525066 Add mandatory injection of values 2016-12-11 01:31:09 +01:00
Mike Bierlee 52dcecef9a Add optional value injection when values cannot be injected by injectors 2016-12-11 01:15:30 +01:00
Mike Bierlee 9eb3a89695 Make it clear when a value injector is missing 2016-12-11 00:53:21 +01:00
Mike Bierlee 4954979574 Move value injection test to its own test file 2016-12-10 22:46:32 +01:00
Mike Bierlee d3ed3e91b9 Add value injector 2016-12-09 02:15:59 +01:00
Mike Bierlee e1f0cca5c5 Fix injection of dependencies from foreign modules
Fixes issue #12
2016-09-05 19:37:53 +02:00
Mike Bierlee 9cc320aa93 Add test of prevention of transitive dependencies 2016-09-03 18:40:01 +02:00
Mike Bierlee 95e30477c6 Prevent creation of circular dependencies in constructors 2016-09-03 16:57:38 +02:00
Mike Bierlee c0553967c9 Add extra testcase 2016-08-23 21:20:54 +02:00
Mike Bierlee ab765e0092 Add constructor injection 2016-08-23 00:11:29 +02:00
Mike Bierlee 81c6faed16 Pass factory through constructor to prevent nullpointer exceptions 2016-08-17 23:01:22 +02:00
Mike Bierlee 6b3b23a376 Move factory parameters to parameter object 2016-08-17 22:28:47 +02:00
Mike Bierlee 44e77aff9c Move factory stuff to own module 2016-08-17 20:44:36 +02:00
Mike Bierlee b6ccc9d4a9 Pull keeping track of originating containmer up to Registration class 2016-08-08 23:06:05 +02:00
Mike Bierlee 9e5a27d046 Deprecate singleton factory method
The factory method encourages misuse of dependency injection (by using it as a service locator). Removing the factory method forces the user to make this choice deliberately.
2016-08-08 22:17:17 +02:00
Mike Bierlee 02dbe20c64 Remove deprecated muck 2016-08-08 21:32:27 +02:00
Mike Bierlee 771c49d86a Deprecate array-based assignment of persistent resolve/registration options 2016-06-27 20:55:07 +02:00
Mike Bierlee f67e67b93c Fix test to properly test the variadic variant 2016-06-27 20:43:12 +02:00
Mike Bierlee e800a9029e Test deprecated options-by-array overload 2016-06-27 20:40:08 +02:00
Thayne McCombs 6255292069 Use bit flags for options.
A more idiomatic and efficient way of passing options.
2016-06-26 21:45:48 -06:00
Mike Bierlee 7308702dfe Add ability to mark autowire dependencies as optional 2016-02-15 22:52:48 +01:00
Mike Bierlee 6746fd64a0 Add resolve options to resolveAll 2016-02-15 22:52:48 +01:00
Mike Bierlee 21d727c500 Add resolve option for not throwing a resolveException 2016-02-15 22:52:47 +01:00
Mike Bierlee f2ff12dc58 Make ApplicationContext more robust
By including members with non-public visibility
2016-02-10 00:36:44 +01:00
Mike Bierlee 13921a128e Simplify templated calls in test 2016-02-10 00:34:01 +01:00
Mike Bierlee 85c31574ac Cleanup whitespace 2016-02-10 00:24:45 +01:00
Stephan Dilly f84b025110 fix autowiring in base classes 2016-02-09 22:21:36 +01:00
Mike Bierlee d87c8a0457 Merge branch 'feature/autowire-private-fields' of https://github.com/Extrawurst/poodinis into Extrawurst-feature/autowire-private-fields
Conflicts:
	README.md
2016-02-09 20:28:07 +01:00
Stephan Dilly 7d2ba1bef9 allow autowiring private fields too 2016-02-09 18:01:21 +01:00
Mike Bierlee 111623166e Add test to verify registerBeforeResolving fails for interfaces 2016-02-03 23:51:19 +01:00
Mike Bierlee 5d9ac73418 Add setting persistent resolve options 2016-02-03 23:13:36 +01:00
Mike Bierlee 9ebbb5d917 Add ability to register a type while resolving it
Closes #5
2016-02-03 23:05:39 +01:00
Mike Bierlee e7a29f17f7 Allow register by concrete type to also get registration options
Although the currently only available option will do nothing
2016-02-03 22:24:22 +01:00
Mike Bierlee 065e7111cd Deprecate calling register() with RegistationOptions in a variadic way
Variadic options will conflict when added to resolve(). To keep the interface consistent, register should follow suit. Supply options using a list of options instead.
2016-02-03 22:17:10 +01:00
Mike Bierlee 46dddbfd46 Deprecate RegistrationOption.DO_NOT_ADD_CONCRETE_TYPE_REGISTRATION in favor of RegistrationOption.doNotAddConcreteTypeRegistration 2016-02-03 22:15:07 +01:00
Mike Bierlee def5ec2e88 Add setting persistent registration options 2016-02-03 21:28:33 +01:00
Mike Bierlee 7bd0795b3f Fix line delimiters 2016-01-06 20:28:25 +01:00
Mike Bierlee c35e494dfe Update copyrights 2016-01-06 20:18:35 +01:00
Mike Bierlee 4b1bc5077a Remove deprecated registration option 2015-12-28 22:42:23 +01:00
Mike Bierlee 4d62f3fdb0 Add registering component factories as prototype
Which makes them the opposite of singletons
2015-12-24 21:50:12 +01:00
Mike Bierlee d310640717 Register application contexts as a resolvable dependency
For those who like to play with fire
2015-12-24 20:41:05 +01:00
Mike Bierlee f206b594c8 Add autowiring of application contexts on registration 2015-12-24 20:31:26 +01:00
Mike Bierlee 2e4c688ab2 Add registeration of context components when registering via dependency container 2015-12-24 20:12:48 +01:00
Mike Bierlee 57b548aeae Add specifying components by supertype 2015-12-24 19:51:49 +01:00
Mike Bierlee 1bf1734c53 Add registration of components through factory methods
A basic version of Bean factories from the Spring framework
2015-12-24 18:45:18 +01:00
Mike Bierlee 55d3139f5b Add registration of basic dependencies through application context 2015-12-24 01:11:39 +01:00