public final class LCCore extends Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
LCCore.Environment
Interface to implement according to the environment.
|
static interface |
LCCore.MainThreadExecutor
Interface to implement to override the main thread executor.
|
| Modifier and Type | Method and Description |
|---|---|
static void |
executeInMainThread(Runnable toExecute)
Ask to execute the given Runnable in the main thread as soon as the thread is available.
|
static LCCore.Environment |
get()
Return the environment.
|
static Application |
getApplication() |
static Thread |
getMainThread() |
static void |
init(LCCore.Environment env)
Initialization.
|
static void |
keepMainThread(Runnable toContinue)
Because some systems may need to use the main thread for specific action (like Cocoa),
we keep the current thread aside, and continue on a new thread.
|
static void |
replaceMainThreadExecutor(LCCore.MainThreadExecutor executor)
Replace the main thread executor.
|
static void |
stop(boolean forceJvmToStop)
Stop the environement.
|
public static LCCore.Environment get()
public static void init(LCCore.Environment env)
public static Application getApplication()
public static void stop(boolean forceJvmToStop)
public static void keepMainThread(Runnable toContinue)
toContinue - the Runnable to run on a new Thread to continue the application startuppublic static Thread getMainThread()
public static void executeInMainThread(Runnable toExecute)
public static void replaceMainThreadExecutor(LCCore.MainThreadExecutor executor)
Copyright © 2017. All rights reserved.