public final class FactoryFinder
extends java.lang.Object
java.util.ServiceLoader.
Its main design goal is to avoid class loader leaks.
To achieve this it doesn't create any internal caches.| Modifier and Type | Method and Description |
|---|---|
static <T> T |
find(java.lang.Class<T> factoryIface)
Instantiates a factory object given the factory's interface class.
|
static <T> T |
find(java.lang.Class<T> factoryIface,
java.lang.String fallbackImpl)
Instantiates a factory object given the factory's interface class.
|
public static <T> T find(java.lang.Class<T> factoryIface)
T - interface class typefactoryIface - required factory interface class to look implementation forpublic static <T> T find(java.lang.Class<T> factoryIface,
java.lang.String fallbackImpl)
T - interface class typefactoryIface - required factory interface class to look impl. forfallbackImpl - optional fallback factory impl. class nameCopyright © 2017 FOSS Nova Software Foundation. All rights reserved.