|
Lombok - v0.11.2 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectlombok.core.SpiLoadUtil
public class SpiLoadUtil
The java core libraries have a SPI discovery system, but it works only in Java 1.6 and up. For at least Eclipse,
lombok actually works in java 1.5, so we've rolled our own SPI discovery system.
It is not API compatible with ServiceLoader.
ServiceLoader| Method Summary | ||
|---|---|---|
static Class<? extends Annotation> |
findAnnotationClass(Class<?> c,
Class<?> base)
This method will find the @{code T} in public class Foo extends BaseType<T>. |
|
static
|
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
|
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
|
readAllFromIterator(Iterable<T> findServices)
Method that conveniently turn the Iterables returned by the other methods in this class to a
List. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static <T> List<T> readAllFromIterator(Iterable<T> findServices)
Iterables returned by the other methods in this class to a
List.
findServices(Class),
findServices(Class, ClassLoader)
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.
IOException
public 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.
IOException
public 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.
|
Lombok - v0.11.2 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||