Commit graph

10 commits

Author SHA1 Message Date
7cfb53c60e Component state - tests for init and destroy 2015-09-17 22:37:11 +02:00
5032e44182 Changes for component-provided names
* The component registration record may now include a "name provider" (a
function returning a string based on an instance of the component),
which will be used to determine the component's name.
* NameProvider annotation indicates a method that returns the
component's name
2015-09-17 13:33:39 +02:00
81ea62047e Component state and registry - fixes and refactoring
* Errors during shutdown or destruction will be thrown as exceptions.
Returning the collection of errors was clumsy, at best - if something
goes wrong, the registry has failed anyway.
* Recursive initialisation and destruction methods in ComponentState
* Use ComponentState's methods while initialising, starting up, shutting
down or destroying the registry.
2015-09-17 10:18:09 +02:00
6d0753c7a8 Components registration - package scanning 2015-09-16 17:50:13 +02:00
0c23f613d6 Improved component naming
* Setting a component information record's name to null will lead to an
anonymous component, while setting it to an empty string will lead to an
component whose name is that of its class.
* New Anonymous annotation to indicate that a component is meant to be
anonymous (conflicts with ParametricComponent or valued Component
annotations).
2015-09-16 11:10:54 +02:00
36887ae759 Registry-aware components
The RegistryAware interface can be implemented in order to let the
component know of the registry it is being bound to.
2015-09-16 10:45:40 +02:00
e688bb366c Component state - tests 2015-09-16 09:38:53 +02:00
5dc745670b New component record - Unspecific dependency injector storage
Dependency injection functions are now stored as type-unspecific. This
makes them easier to use.
2015-09-15 09:40:46 +02:00
a932b90b7d Tests for the component registration record
Tests are mostly about the fromClass() method, which processes
annotations.
2015-09-14 11:23:22 +02:00
93e8c9a90e Started writing tests 2015-09-13 15:03:43 +02:00