Interface FactoryIteratorProvider


  • public interface FactoryIteratorProvider
    Provides iterators over factories of specified categories. Users shall register an implementation of this interface when the default lookup mechanism (namely scanning the content of the META-INF/services/ category file in every JARs found on the classpath) can not work. Such need may appear in the context of class loaders restricting access to non-package directories as META-INF. This constraint occurs on the Eclipse platform for instance.
    Since:
    2.4
    Author:
    Martin Desruisseaux
    See Also:
    FactoryRegistry#addFactoryIteratorProvider, CommonFactory#addFactoryIteratorProvider
    • Method Detail

      • iterator

        <T> Iterator<T> iterator​(Class<T> category)
        Returns an iterator over all factories of the specified category. The category argument should be the interface class to be implemented, not the actual implementation.
        Parameters:
        category - The category for the factories to be returned.
        Returns:
        Factories that implement the specified category.