Class CodenameOneThread
java.lang.Object
java.lang.Thread
com.codename1.impl.CodenameOneThread
- All Implemented Interfaces:
Runnable
Thread class implementing the crash protection functionality
-
Nested Class Summary
Nested classes/interfaces inherited from class Thread
Thread.State, Thread.UncaughtExceptionHandler -
Field Summary
Fields inherited from class Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY -
Constructor Summary
ConstructorsConstructorDescriptionCodenameOneThread(Runnable r, String threadName) Constructor accepting the runnable -
Method Summary
Modifier and TypeMethodDescriptionPrints the stack trace matching the given stackstatic voidhandleException(Throwable err) booleanstatic voidpop()Pops the current method from the stackvoidpopStack()Pops the method stack pointerstatic voidpush(int method) Pushes the method to the current thread stackvoidpushStack(int method) Pushes a method id into the stackvoidrun()Catches exceptionstatic voidstoreStack(Throwable th, int currentStackFrame) Stores the stack for the given exceptionvoidstoreStackForException(Throwable t, int currentStackFrame) Stores the stack for the given exceptionMethods inherited from class Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
-
Constructor Details
-
CodenameOneThread
-
-
Method Details
-
push
public static void push(int method) Pushes the method to the current thread stack
Parameters
method: the method id
-
pop
public static void pop()Pops the current method from the stack -
storeStack
Stores the stack for the given exception
Parameters
th: the exception mapping to the given stack
-
handleException
-
hasStackFrame
public boolean hasStackFrame() -
pushStack
public void pushStack(int method) Pushes a method id into the stack
Parameters
method: the method id
-
popStack
public void popStack()Pops the method stack pointer -
storeStackForException
Stores the stack for the given exception
Parameters
t: the exception mapping to the given stack
-
getStack
-
run
-