org.geotoolkit.factory
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
Version:
3.00
Author:
Martin Desruisseaux (IRD)
See Also:
Factories.addFactoryIteratorProvider(org.geotoolkit.factory.FactoryIteratorProvider)
Module:
utility/geotk-utility (download)    View source code for this class

Method Summary
<T> Iterator<T>
iterator(Class<T> category)
          Returns an iterator over all factory implementations of the given category.
 

Method Detail

iterator

<T> Iterator<T> iterator(Class<T> category)
Returns an iterator over all factory implementations of the given category. The category argument is the interface to be implemented, not the actual implementation class. The returned implementation is often a instance of some Factory subclass, but this is not mandatory - it could be any object.

Type Parameters:
T - The category for the factories to be returned.
Parameters:
category - The category for the factories to be returned.
Returns:
Factories that implement the specified category.


Copyright © 2009-2012 Geotoolkit.org. All Rights Reserved.