public class SpiLoadUtil extends Object
ServiceLoader.ServiceLoader| Modifier and Type | Method and Description |
|---|---|
static Class<? extends Annotation> |
findAnnotationClass(Class<?> c,
Class<?> base)
This method will find the @{code T} in
public class Foo extends BaseType<T>. |
static <C> Iterable<C> |
findServices(Class<C> target)
Returns an iterator of instances that, at least according to the spi discovery file, are implementations
of the stated class.
|
static <C> Iterable<C> |
findServices(Class<C> target,
ClassLoader loader)
Returns an iterator of class objects that, at least according to the spi discovery file, are implementations
of the stated class.
|
static <T> List<T> |
readAllFromIterator(Iterable<T> findServices)
Method that conveniently turn the
Iterables returned by the other methods in this class to a
List. |
public static <T> List<T> readAllFromIterator(Iterable<T> findServices)
Iterables returned by the other methods in this class to a
List.public static <C> Iterable<C> findServices(Class<C> target) throws IOException
findServices(Class, ClassLoader) method with
this Thread's context class loader as ClassLoader.target - class to find implementations for.IOExceptionpublic static <C> Iterable<C> findServices(Class<C> target, ClassLoader loader) throws IOException
target - class to find implementations for.loader - The classloader object to use to both the spi discovery files, as well as the loader to use
to make the returned instances.IOExceptionpublic static Class<? extends Annotation> findAnnotationClass(Class<?> c, Class<?> base)
public class Foo extends BaseType<T>.
It returns an annotation type because it is used exclusively to figure out which annotations are
being handled by lombok.eclipse.EclipseAnnotationHandler and lombok.javac.JavacAnnotationHandler.Copyright © 2011-2015 The Project Lombok Authors, licensed under the MIT licence.