Package com.google.auto.value.processor
Class SimpleServiceLoader
- java.lang.Object
-
- com.google.auto.value.processor.SimpleServiceLoader
-
public final class SimpleServiceLoader extends Object
A replacement forServiceLoader
that avoids certain long-standing bugs. This simpler implementation does not bother with lazy loading but returns all the service implementations in one list. It makes sure thatURLConnection.setUseCaches(boolean)
is called to turn off jar caching, since that tends to lead to problems in versions before JDK 9.- See Also:
- Issue #718, JDK-8156014
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> com.google.common.collect.ImmutableList<T>
load(Class<? extends T> service, ClassLoader loader)
static <T> com.google.common.collect.ImmutableList<T>
load(Class<? extends T> service, ClassLoader loader, Optional<Pattern> allowedMissingClasses)
-
-
-
Method Detail
-
load
public static <T> com.google.common.collect.ImmutableList<T> load(Class<? extends T> service, ClassLoader loader)
-
load
public static <T> com.google.common.collect.ImmutableList<T> load(Class<? extends T> service, ClassLoader loader, Optional<Pattern> allowedMissingClasses)
-
-