Class CodenameOneThread

java.lang.Object
java.lang.Thread
com.codename1.impl.CodenameOneThread
All Implemented Interfaces:
Runnable

public class CodenameOneThread extends Thread
Thread class implementing the crash protection functionality
  • Constructor Details

    • CodenameOneThread

      public CodenameOneThread(Runnable r, String threadName)
      Constructor accepting the runnable
  • 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

      public static void storeStack(Throwable th, int currentStackFrame)

      Stores the stack for the given exception

      Parameters
      • th: the exception mapping to the given stack
    • handleException

      public static void handleException(Throwable err)
    • 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

      public void storeStackForException(Throwable t, int currentStackFrame)

      Stores the stack for the given exception

      Parameters
      • t: the exception mapping to the given stack
    • getStack

      public String getStack(Throwable t)
      Prints the stack trace matching the given stack
    • run

      public void run()
      Catches exception
      Specified by:
      run in interface Runnable
      Overrides:
      run in class Thread