blob: 8308a99148619e8c94909e8516cb8ce2470c74ca [file] [log] [blame]
Aurimas Liutikas93554f22022-04-19 16:51:35 -07001/*
2 * Copyright (C) 2014 The Android Open Source Project
3 * Copyright (c) 1994, 2013, Oracle and/or its affiliates. All rights reserved.
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 *
6 * This code is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License version 2 only, as
8 * published by the Free Software Foundation. Oracle designates this
9 * particular file as subject to the "Classpath" exception as provided
10 * by Oracle in the LICENSE file that accompanied this code.
11 *
12 * This code is distributed in the hope that it will be useful, but WITHOUT
13 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15 * version 2 for more details (a copy is included in the LICENSE file that
16 * accompanied this code).
17 *
18 * You should have received a copy of the GNU General Public License version
19 * 2 along with this work; if not, write to the Free Software Foundation,
20 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
21 *
22 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
23 * or visit www.oracle.com if you need additional information or have any
24 * questions.
25 */
26
27
28package java.lang;
29
30import java.security.AccessControlContext;
31import java.security.AccessController;
32import java.util.Map;
33import java.util.concurrent.locks.LockSupport;
34import java.lang.ref.Reference;
35import java.lang.ref.WeakReference;
36
37@SuppressWarnings({"unchecked", "deprecation", "all"})
38public class Thread implements java.lang.Runnable {
39
40public Thread() { throw new RuntimeException("Stub!"); }
41
42public Thread(java.lang.Runnable target) { throw new RuntimeException("Stub!"); }
43
44public Thread(java.lang.ThreadGroup group, java.lang.Runnable target) { throw new RuntimeException("Stub!"); }
45
46public Thread(java.lang.String name) { throw new RuntimeException("Stub!"); }
47
48public Thread(java.lang.ThreadGroup group, java.lang.String name) { throw new RuntimeException("Stub!"); }
49
50public Thread(java.lang.Runnable target, java.lang.String name) { throw new RuntimeException("Stub!"); }
51
52public Thread(java.lang.ThreadGroup group, java.lang.Runnable target, java.lang.String name) { throw new RuntimeException("Stub!"); }
53
54public Thread(java.lang.ThreadGroup group, java.lang.Runnable target, java.lang.String name, long stackSize) { throw new RuntimeException("Stub!"); }
55
56public static native java.lang.Thread currentThread();
57
58public static native void yield();
59
60public static void sleep(long millis) throws java.lang.InterruptedException { throw new RuntimeException("Stub!"); }
61
62public static void sleep(long millis, int nanos) throws java.lang.InterruptedException { throw new RuntimeException("Stub!"); }
63
64protected java.lang.Object clone() throws java.lang.CloneNotSupportedException { throw new RuntimeException("Stub!"); }
65
66public synchronized void start() { throw new RuntimeException("Stub!"); }
67
68public void run() { throw new RuntimeException("Stub!"); }
69
70@Deprecated
71public final void stop() { throw new RuntimeException("Stub!"); }
72
73@Deprecated
74public final synchronized void stop(java.lang.Throwable obj) { throw new RuntimeException("Stub!"); }
75
76public void interrupt() { throw new RuntimeException("Stub!"); }
77
78public static native boolean interrupted();
79
80public native boolean isInterrupted();
81
82@Deprecated
83public void destroy() { throw new RuntimeException("Stub!"); }
84
85public final boolean isAlive() { throw new RuntimeException("Stub!"); }
86
87@Deprecated
88public final void suspend() { throw new RuntimeException("Stub!"); }
89
90@Deprecated
91public final void resume() { throw new RuntimeException("Stub!"); }
92
93public final void setPriority(int newPriority) { throw new RuntimeException("Stub!"); }
94
95public final int getPriority() { throw new RuntimeException("Stub!"); }
96
97public final synchronized void setName(java.lang.String name) { throw new RuntimeException("Stub!"); }
98
99public final java.lang.String getName() { throw new RuntimeException("Stub!"); }
100
101public final java.lang.ThreadGroup getThreadGroup() { throw new RuntimeException("Stub!"); }
102
103public static int activeCount() { throw new RuntimeException("Stub!"); }
104
105public static int enumerate(java.lang.Thread[] tarray) { throw new RuntimeException("Stub!"); }
106
107@Deprecated
108public int countStackFrames() { throw new RuntimeException("Stub!"); }
109
110public final void join(long millis) throws java.lang.InterruptedException { throw new RuntimeException("Stub!"); }
111
112public final void join(long millis, int nanos) throws java.lang.InterruptedException { throw new RuntimeException("Stub!"); }
113
114public final void join() throws java.lang.InterruptedException { throw new RuntimeException("Stub!"); }
115
116public static void dumpStack() { throw new RuntimeException("Stub!"); }
117
118public final void setDaemon(boolean on) { throw new RuntimeException("Stub!"); }
119
120public final boolean isDaemon() { throw new RuntimeException("Stub!"); }
121
122public final void checkAccess() { throw new RuntimeException("Stub!"); }
123
124public java.lang.String toString() { throw new RuntimeException("Stub!"); }
125
126public java.lang.ClassLoader getContextClassLoader() { throw new RuntimeException("Stub!"); }
127
128public void setContextClassLoader(java.lang.ClassLoader cl) { throw new RuntimeException("Stub!"); }
129
130public static native boolean holdsLock(java.lang.Object obj);
131
132public java.lang.StackTraceElement[] getStackTrace() { throw new RuntimeException("Stub!"); }
133
134public static java.util.Map<java.lang.Thread,java.lang.StackTraceElement[]> getAllStackTraces() { throw new RuntimeException("Stub!"); }
135
136public long getId() { throw new RuntimeException("Stub!"); }
137
138public java.lang.Thread.State getState() { throw new RuntimeException("Stub!"); }
139
140public static void setDefaultUncaughtExceptionHandler(java.lang.Thread.UncaughtExceptionHandler eh) { throw new RuntimeException("Stub!"); }
141
142public static java.lang.Thread.UncaughtExceptionHandler getDefaultUncaughtExceptionHandler() { throw new RuntimeException("Stub!"); }
143
144@android.annotation.SystemApi(client = android.annotation.SystemApi.Client.MODULE_LIBRARIES)
145@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
146public static void setUncaughtExceptionPreHandler(UncaughtExceptionHandler eh) { throw new RuntimeException("Stub!"); }
147
148@android.annotation.SystemApi(client = android.annotation.SystemApi.Client.MODULE_LIBRARIES)
149@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
150public static UncaughtExceptionHandler getUncaughtExceptionPreHandler() { throw new RuntimeException("Stub!"); }
151
152public java.lang.Thread.UncaughtExceptionHandler getUncaughtExceptionHandler() { throw new RuntimeException("Stub!"); }
153
154public void setUncaughtExceptionHandler(java.lang.Thread.UncaughtExceptionHandler eh) { throw new RuntimeException("Stub!"); }
155
156public static final int MAX_PRIORITY = 10; // 0xa
157
158public static final int MIN_PRIORITY = 1; // 0x1
159
160public static final int NORM_PRIORITY = 5; // 0x5
161@SuppressWarnings({"unchecked", "deprecation", "all"})
162public static enum State {
163NEW,
164RUNNABLE,
165BLOCKED,
166WAITING,
167TIMED_WAITING,
168TERMINATED;
169}
170
171@SuppressWarnings({"unchecked", "deprecation", "all"})
172@java.lang.FunctionalInterface
173public static interface UncaughtExceptionHandler {
174
175public void uncaughtException(java.lang.Thread t, java.lang.Throwable e);
176}
177
178}
179