I want to get all the implementations of an Interface. One of the answer given here suggests to use Spring DI. It is simple and works.
- My question is that, how to retrieve the implementations based on a some order.
- If above can be achieved, how will it behave in a multi module application.
Please find the sample app here . There is a library module which defines an Interface and has 2 implementations. In application module which is dependent on library, also has additional implementations of same Interface. In the example, the library class just checks the type of a given string(empty, palindrome or text). Obviously if the order is not maintained, the function may return invalid results. Answers to above questions will help me to resolve this problem.