org.apache.commons.classscan.util
Class FactoryCache<T>

java.lang.Object
  extended by 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.


Constructor Summary
FactoryCache(Class<T> serviceProvider, ClassLoader classLoader)
          Find service providers available to the given classLoader
 
Method Summary
 Iterator<T> iterator()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FactoryCache

public FactoryCache(Class<T> serviceProvider,
                    ClassLoader classLoader)
Find service providers available to the given classLoader

Parameters:
serviceProvider - The interface of the service provider
classLoader - The ClassLoader to load the service provider instances
Method Detail

iterator

public Iterator<T> iterator()
Specified by:
iterator in interface Iterable<T>


Copyright © 2012 The Apache Software Foundation. All Rights Reserved.