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
Mike Bierlee
be5eb37617
Remove public imports
2015-12-24 01:01:30 +01:00
Mike Bierlee
80916c47fb
Add factory method invocation to instance factory
2015-12-23 18:32:29 +01:00
Mike Bierlee
2ebef4c466
Refactor registration scopes into simplified instance factory
2015-12-23 17:51:55 +01:00
Mike Bierlee
ae9e0bab68
Rename RegistrationOptions -> RegistrationOption, deprecate usage of old name
2015-09-26 22:46:47 +02:00
Mike Bierlee
da16513a8d
Always register concrete type when registering type by supertype by default.
...
This deprecates ADD_CONCRETE_TYPE_REGISTRATION (see DO_NOT_ADD_CONCRETE_TYPE_REGISTRATION for reverse configuration). This also means you do not need to use qualifiers when registering single type of super type by super type.
2015-08-17 22:28:26 +02:00
Mike Bierlee
3e11ff1e92
Add ability to assign new instance to autowired member regardless of registration scope
2015-07-06 22:55:40 +02:00
Mike Bierlee
1ce37e6eda
Add autowiring of dynamic arrays
2015-07-04 14:06:35 +02:00
Mike Bierlee
805a3ebaeb
Add test for testing if autowiring still works when using resolveAll
2015-07-04 13:59:10 +02:00
Mike Bierlee
53fb0d8116
Add resolving all registered types of a certain super type
2015-07-04 13:53:47 +02:00
Mike Bierlee
27e7b74e73
Add registration option for registering a class by concrete type when registering by supertype
2015-05-03 02:03:34 +02:00
Mike Bierlee
d23230faae
Restrict access to registration members more tightly
2015-05-03 00:54:31 +02:00
Mike Bierlee
eb05f7702f
Add registration linking
2015-05-03 00:46:51 +02:00
Mike Bierlee
24e9a67219
Add tests for registering and resolving accross threads
2015-03-28 18:01:16 +01:00
Mike Bierlee
09695e9770
Add test for testing autowire stack pop-back mechanism
2015-03-28 17:29:48 +01:00
Mike Bierlee
a7ab3ea4d8
Remove unnecesary componentIsNull methods
2015-03-28 17:07:44 +01:00
Mike Bierlee
9860624148
Synchronize DependencyContainer
...
The implication is that dependency containers are now always shared data. In the sense of application context, this is acceptable.
2015-03-28 16:36:02 +01:00
Mike Bierlee
83ad8c64c0
Add test that asserts whether autowiring a class that depends on itself works.
2015-02-23 20:01:44 +01:00
Mike Bierlee
89d82efb11
Refactor getting existing registration to separate function
2015-02-22 19:11:38 +01:00
Mike Bierlee
e44cdf276a
Remove deprecated "autowire in constructor"
2015-02-15 14:52:01 +01:00
Mike Bierlee
cb42ebc8c1
Update copyrights
2015-01-25 21:55:02 +01:00
Mike Bierlee
36992c633a
Autowire dependencies using autowired registrations instead of letting the container handle it
...
This fixes known issue "Resolving a class registered by supertype..."
2015-01-25 21:04:17 +01:00
Mike Bierlee
5ebb5805cf
Use instantiation context to decide whether to autowire or not
2015-01-25 19:46:17 +01:00
Mike Bierlee
9d931f511b
Add registration class that will autowire instances itself
2015-01-25 15:07:11 +01:00
Mike Bierlee
1d74064c15
Reintroduce module container
2015-01-25 13:37:14 +01:00
Mike Bierlee
7ee67ee836
Specify qualifiers in Autowire UDA instead of using separate UDA
2014-12-13 23:15:43 +01:00
Mike Bierlee
1166d2811a
Add @Qualifier UDA for qualifying members typed by supertype
2014-12-13 22:06:11 +01:00
Mike Bierlee
8b9c8d2774
Add ability to resolve type which has multiple registrations by qualifier
2014-11-27 00:33:13 +01:00
Mike Bierlee
d6e3043c7d
Prevent multiple registrations of same super- and concrete type
2014-11-26 23:37:29 +01:00
Mike Bierlee
5d7a21ae52
Add ability to register multiple concrete classes for same supertype
2014-11-26 23:22:56 +01:00
Mike Bierlee
4e8555c7da
Rename and deprecate "container" module
2014-10-25 16:43:32 +02:00
Mike Bierlee
b2bb6f15c4
Rename "Container" -> "DependencyContainer". Deprecate use of "Container"
2014-10-25 15:24:42 +02:00
Mike Bierlee
92db3c0405
Add "Autowired" alias for "Autowire" UDA to satisfy Spring habits
2014-10-12 17:41:09 +02:00
Mike Bierlee
e19564e3cf
Fix incorrect clearing of registrations
2014-10-05 13:43:57 +02:00
Mike Bierlee
b38bccc03c
Fix autowiring classes with non-symbolic unassignable members (such as aliases)
2014-07-09 23:15:05 +02:00
Mike Bierlee
c4c57da9eb
Clear all registrations after test is done
2014-06-22 17:24:08 +02:00
Mike Bierlee
627d165d6f
Add mixin for boilerplate workaround
2014-06-22 17:16:07 +02:00
Mike Bierlee
06024e55db
Use typeof instead
2014-06-22 16:52:50 +02:00
Mike Bierlee
47d7f72fae
Add test for resolve by interface workaround
2014-06-22 16:33:15 +02:00
Mike Bierlee
17c833a114
Use auto instead of explicit type in autowiretest
2014-06-22 16:13:25 +02:00
Mike Bierlee
ad0f36b19a
Mark bug test-case as being a bug
2014-06-14 16:05:04 +02:00
Mike Bierlee
f97a689f29
Accept defeat and recognize resolve by supertype/interface bug
...
For now....
2014-06-13 23:49:34 +02:00
Mike Bierlee
b66b9d5def
Fix autowiring deep circular dependencies
2014-06-04 00:16:24 +02:00
Mike Bierlee
40e9ae4027
Test circular dependency by third-degree
...
Look I just had to made a term up for these kind of dependencies, okay?
2014-06-02 00:03:03 +02:00
Mike Bierlee
a53080c109
Prevent endless recursion on autowiring circular dependencies
2014-06-01 23:49:12 +02:00
Mike Bierlee
b0df553ca9
Add test for re-wiring existing members
2014-06-01 23:48:19 +02:00
Mike Bierlee
e5484edb19
Apply open-source MIT license
2014-06-01 19:05:02 +02:00
Mike Bierlee
121d871572
Replace type validity check with template parameter specialization
2014-05-31 23:37:02 +02:00
Mike Bierlee
b78e05455d
Add removing of registrations
2014-05-31 23:22:29 +02:00
Mike Bierlee
60b1149aea
Add test for autowiring circular dependencies
2014-05-30 01:19:51 +02:00
Mike Bierlee
ec5cad2bbf
Add test for autowiring member with different attribute
2014-05-30 01:04:40 +02:00
Mike Bierlee
58d0c2b6e0
Add test for autowiring unregistered types
2014-05-30 00:51:03 +02:00
Mike Bierlee
52936379e4
Autowire upon resolving instances
2014-05-30 00:42:58 +02:00
Mike Bierlee
9e59dc0a37
Fix line delimiter
2014-05-30 00:34:49 +02:00
Mike Bierlee
35acaa84d1
Only autowire members which are null
2014-05-30 00:33:08 +02:00
Mike Bierlee
4957b67b49
Test that you can autowire members declared as an interface type
2014-05-27 02:02:07 +02:00
Mike Bierlee
a9e5b315e3
Add autowiring of concrete types in existing instances
2014-05-27 01:54:08 +02:00
Mike Bierlee
cbecebf43f
Add existing instance registration scope
2014-05-21 00:26:44 +02:00
Mike Bierlee
bb0a8d5746
Add registration scope for existing instances
2014-05-20 23:54:45 +02:00
Mike Bierlee
abdcd39e9e
Add scope setter for new instance scope
2014-05-20 23:36:33 +02:00
Mike Bierlee
8b5122ad91
Add new instance registration scope
2014-05-20 23:31:28 +02:00
Mike Bierlee
aed449e565
Add test for registering class with single instance scope
2014-05-20 23:07:42 +02:00
Mike Bierlee
2bced68e43
Change reference into class, makes it more easily passed as reference
2014-05-20 23:06:27 +02:00
Mike Bierlee
64e25715cf
Add scope setter for single instance scopes
2014-05-20 22:12:14 +02:00
Mike Bierlee
4f2f0fbe59
Add single instance scope, make it the default scope of new registrations
2014-05-20 22:03:50 +02:00
Mike Bierlee
0c084a43b9
Add scope to registration, check for unset scope
2014-05-20 21:54:11 +02:00
Mike Bierlee
990c9f017b
Move test descriptions outide of unittest block to make them readable when collapsed
2014-05-20 21:36:07 +02:00
Mike Bierlee
464abd9cb0
Skip validity check on registering concrete type
2014-05-20 01:12:15 +02:00
Mike Bierlee
b18b6ed49c
Add global singleton for simplified use of container
2014-05-20 00:35:49 +02:00
Mike Bierlee
27a50a53cf
Remove static context from container
2014-05-20 00:23:25 +02:00
Mike Bierlee
da1f604ef7
Add global setting for disabling type validity
2014-05-20 00:16:44 +02:00
Mike Bierlee
423f21230a
Throw exception when resolving non-registered type
2014-05-16 02:05:04 +02:00
Mike Bierlee
27d86ce8c7
Fix typo registratedType -> registeredType
2014-05-16 01:38:28 +02:00
Mike Bierlee
cc3c0d5f6d
Add type validity check
2014-05-16 01:36:17 +02:00
Mike Bierlee
535f5df482
Allow registration by interfaces
2014-05-16 00:23:06 +02:00
Mike Bierlee
5df222f509
Add resolving of registered types
2014-05-10 14:52:29 +02:00
Mike Bierlee
20e78b8d93
Add registration of concrete classes
2014-05-06 01:32:22 +02:00