Interface BeanMapCollector


  • public interface BeanMapCollector
    Implement this in order to cause spring to inject a map of type -> a set of beans into your spring bean (if any exist) which implement the type interfaces you define (those interfaces will also have to implement AutoRegister)
    Author:
    Aaron Zeckoski (aaron@caret.cam.ac.uk)
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      Class<?>[] getCollectedTypes()
      This allows the developer to set the types of the beans which they want collected
      void setCollectedBeansMap​(Map<Class<?>,​List<?>> collectedBeans)
      This setter will be called automatically and the beans which are being collected for you will be placed in the map such that it is a map of class type -> list of beans of that type
    • Method Detail

      • setCollectedBeansMap

        void setCollectedBeansMap​(Map<Class<?>,​List<?>> collectedBeans)
        This setter will be called automatically and the beans which are being collected for you will be placed in the map such that it is a map of class type -> list of beans of that type
        Parameters:
        collectedBeans - a list of all collected beans which were autoregistered
      • getCollectedTypes

        Class<?>[] getCollectedTypes()
        This allows the developer to set the types of the beans which they want collected
        Returns:
        the class type of the beans to collect