public final class App extends Object
Application object from a static context.
NOTE: use this class only if you don't use and dependency injection library (if you use any you can directly set interfaces through it). init(android.app.Application) method (for example, from Application.onCreate())| Modifier and Type | Method and Description |
|---|---|
static <A extends android.app.Application> |
getApplication() |
static org.solovyev.common.listeners.JEventListeners<org.solovyev.common.listeners.JEventListener<? extends org.solovyev.common.listeners.JEvent>,org.solovyev.common.listeners.JEvent> |
getEventBus() |
static <L extends ServiceLocator> |
getLocator() |
static org.solovyev.common.threads.DelayedExecutor |
getUiThreadExecutor()
Method returns executor which runs on Main Application's thread.
|
static <A extends android.app.Application & ServiceLocator> |
init(A application) |
static void |
init(android.app.Application application,
ServiceLocator serviceLocator) |
static void |
init(android.app.Application application,
UiThreadExecutor uiThreadExecutor,
org.solovyev.common.listeners.JEventListeners<org.solovyev.common.listeners.JEventListener<? extends org.solovyev.common.listeners.JEvent>,org.solovyev.common.listeners.JEvent> eventBus,
ServiceLocator serviceLocator) |
static boolean |
isInitialized() |
public static <A extends android.app.Application & ServiceLocator> void init(@Nonnull A application)
public static void init(@Nonnull android.app.Application application, @Nullable ServiceLocator serviceLocator)
public static void init(@Nonnull android.app.Application application, @Nonnull UiThreadExecutor uiThreadExecutor, @Nonnull org.solovyev.common.listeners.JEventListeners<org.solovyev.common.listeners.JEventListener<? extends org.solovyev.common.listeners.JEvent>,org.solovyev.common.listeners.JEvent> eventBus, @Nullable ServiceLocator serviceLocator)
public static boolean isInitialized()
@Nonnull public static <A extends android.app.Application> A getApplication()
A - real type of applicationinit(android.app.Application) method@Nonnull public static <L extends ServiceLocator> L getLocator()
L - real type of service locator@Nonnull public static org.solovyev.common.threads.DelayedExecutor getUiThreadExecutor()
@Nonnull public static org.solovyev.common.listeners.JEventListeners<org.solovyev.common.listeners.JEventListener<? extends org.solovyev.common.listeners.JEvent>,org.solovyev.common.listeners.JEvent> getEventBus()
Copyright © 2014 se.solovyev. All Rights Reserved.