@FunctionalInterface public interface PresenterFactory
Afterburner will discover the implementations of this interface using the Java extension mechanism.
You will have to register the an implementation by placing a text file:
META-INF/services/com.airhacks.afterburner.injection.PresenterFactory
containing the fully qualified name of the implementation.
| Modifier and Type | Method and Description |
|---|---|
static Iterable<PresenterFactory> |
discover() |
<T> T |
instantiatePresenter(Class<T> clazz,
Function<String,Object> injectionContext)
This method method replaces the standard afterburner dependency
injection.
|
<T> T instantiatePresenter(Class<T> clazz, Function<String,Object> injectionContext)
T - the type of the presenterclazz - presenter class containing the default constructor.injectionContext - a cache of already instantiated and initialized
instances.static Iterable<PresenterFactory> discover()
ServiceLoader mechanismCopyright © 2013–2017 Adam Bien. All rights reserved.