Class SpringExtensionsRegistry

  • All Implemented Interfaces:
    ExtensionsRegistry

    public class SpringExtensionsRegistry
    extends java.lang.Object
    implements ExtensionsRegistry
    An extension registry which works by looking for beans of a specific extension type in a Spring beans factory.
    Author:
    Lucian Chirita (lucianc@users.sourceforge.net)
    • Constructor Summary

      Constructors 
      Constructor Description
      SpringExtensionsRegistry​(org.springframework.beans.factory.ListableBeanFactory beanFactory)
      Creates a Spring-based extension registry.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected java.lang.String[] findExtensionBeanNames​(java.lang.Class<?> extensionType)  
      protected java.lang.String[] getExtensionBeanNames​(java.lang.Class<?> extensionType)  
      <T> java.util.List<T> getExtensions​(java.lang.Class<T> extensionType)
      Returns all beans that match the extension class.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SpringExtensionsRegistry

        public SpringExtensionsRegistry​(org.springframework.beans.factory.ListableBeanFactory beanFactory)
        Creates a Spring-based extension registry.
        Parameters:
        beanFactory - the Spring bean factory
    • Method Detail

      • getExtensions

        public <T> java.util.List<T> getExtensions​(java.lang.Class<T> extensionType)
        Returns all beans that match the extension class.
        Specified by:
        getExtensions in interface ExtensionsRegistry
        Type Parameters:
        T - generic extension type
        Parameters:
        extensionType - the extension type
        Returns:
        a list of extension objects
      • getExtensionBeanNames

        protected java.lang.String[] getExtensionBeanNames​(java.lang.Class<?> extensionType)
      • findExtensionBeanNames

        protected java.lang.String[] findExtensionBeanNames​(java.lang.Class<?> extensionType)