org.apache.commons.classscan.util
Class FactoryCache<T>
java.lang.Object
org.apache.commons.classscan.util.FactoryCache<T>
- Type Parameters:
T
- The interface of the service provider
- All Implemented Interfaces:
- Iterable<T>
public class FactoryCache<T>
- extends Object
- implements Iterable<T>
A cache of service providers.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FactoryCache
public FactoryCache(Class<T> serviceProvider,
ClassLoader classLoader)
- Find service providers available to the given classLoader
- Parameters:
serviceProvider
- The interface of the service providerclassLoader
- The ClassLoader to load the service provider instances
iterator
public Iterator<T> iterator()
- Specified by:
iterator
in interface Iterable<T>
Copyright © 2012 The Apache Software Foundation. All Rights Reserved.