public final class SPIClassIterator<S> extends Object implements Iterator<Class<? extends S>>
ServiceLoader
but is guaranteed to
be bug-free regarding classpath order and does not instantiate or initialize
the classes found.Modifier and Type | Method and Description |
---|---|
static <S> SPIClassIterator<S> |
get(Class<S> clazz) |
static <S> SPIClassIterator<S> |
get(Class<S> clazz,
ClassLoader loader) |
boolean |
hasNext() |
static boolean |
isParentClassLoader(ClassLoader parent,
ClassLoader child)
Utility method to check if some class loader is a (grand-)parent of or the same as another one.
|
Class<? extends S> |
next() |
void |
remove() |
public static <S> SPIClassIterator<S> get(Class<S> clazz)
public static <S> SPIClassIterator<S> get(Class<S> clazz, ClassLoader loader)
public static boolean isParentClassLoader(ClassLoader parent, ClassLoader child)
Copyright © 2000-2014 Apache Software Foundation. All Rights Reserved.