I found "getByPredicate" and "getByAnnotationName" methods insufficient for advanced service aggregation.
Most of the times I need to perform extra operations based on annotation properties. Once services are resolved by one of above method i'm losing information where certain instance comes from.
dic.getByAnnotationName('event-listener')
.then((eventListeners) => {
// what if I need to sort event listener by priority?
// what if I need to perform additional configuration based on annotation properties?
})
Instead introduce "findByAnnotation" and "findByPredicate"
I found "getByPredicate" and "getByAnnotationName" methods insufficient for advanced service aggregation.
Most of the times I need to perform extra operations based on annotation properties. Once services are resolved by one of above method i'm losing information where certain instance comes from.
Instead introduce "findByAnnotation" and "findByPredicate"