/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * This source file is part of SableVM classlib-stubs. * * * * See the file "LICENSE" for the copyright information and for * * the terms and conditions for copying, distribution and * * modification of this source file. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ package java.lang; import java.util.Map; public class Thread extends Object implements Runnable { public static final int MIN_PRIORITY = 1; public static final int NORM_PRIORITY = 5; public static final int MAX_PRIORITY = 10; public Thread() { } public Thread(Runnable target) { } public Thread(ThreadGroup group, Runnable target) { } public Thread(String name) { } public Thread(ThreadGroup group, String name) { } public Thread(Runnable target, String name) { } public Thread(ThreadGroup group, Runnable target, String name) { } public Thread(ThreadGroup group, Runnable target, String name, long stackSize) { } native public static Thread currentThread(); native public static void yield(); native public static void sleep(long millis) throws InterruptedException; native public static void sleep(long millis, int nanos) throws InterruptedException; native public void start(); native public void run(); @Deprecated native public final void stop(); @Deprecated native public final void stop(Throwable obj); native public void interrupt(); native public static boolean interrupted(); native public boolean isInterrupted(); @Deprecated native public void destroy(); native public final boolean isAlive(); @Deprecated native public final void suspend(); @Deprecated native public final void resume(); native public final void setPriority(int newPriority); native public final int getPriority(); native public final void setName(String name); native public final String getName(); native public final ThreadGroup getThreadGroup(); native public static int activeCount(); native public static int enumerate(Thread[] tarray); @Deprecated native public int countStackFrames(); native public final void join(long millis) throws InterruptedException; native public final void join(long millis, int nanos) throws InterruptedException; native public final void join() throws InterruptedException; native public static void dumpStack(); native public final void setDaemon(boolean on); native public final boolean isDaemon(); native public final void checkAccess(); native public String toString(); native public ClassLoader getContextClassLoader(); native public void setContextClassLoader(ClassLoader cl); native public static boolean holdsLock(Object obj); native public StackTraceElement[] getStackTrace(); native public static Map getAllStackTraces(); native public long getId(); native public Thread.State getState(); native public static void setDefaultUncaughtExceptionHandler( Thread.UncaughtExceptionHandler eh); native public static Thread.UncaughtExceptionHandler getDefaultUncaughtExceptionHandler(); native public Thread.UncaughtExceptionHandler getUncaughtExceptionHandler(); native public void setUncaughtExceptionHandler( Thread.UncaughtExceptionHandler eh); public static enum State { NEW, RUNNABLE, BLOCKED, WAITING, TIMED_WAITING, TERMINATED } public static interface UncaughtExceptionHandler { void uncaughtException(Thread t, Throwable e); } }