Aurimas Liutikas | 93554f2 | 2022-04-19 16:51:35 -0700 | [diff] [blame] | 1 | /* |
| 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 | |
| 28 | package java.lang; |
| 29 | |
| 30 | import java.security.AccessControlContext; |
| 31 | import java.security.AccessController; |
| 32 | import java.util.Map; |
| 33 | import java.util.concurrent.locks.LockSupport; |
| 34 | import java.lang.ref.Reference; |
| 35 | import java.lang.ref.WeakReference; |
| 36 | |
| 37 | @SuppressWarnings({"unchecked", "deprecation", "all"}) |
| 38 | public class Thread implements java.lang.Runnable { |
| 39 | |
| 40 | public Thread() { throw new RuntimeException("Stub!"); } |
| 41 | |
| 42 | public Thread(java.lang.Runnable target) { throw new RuntimeException("Stub!"); } |
| 43 | |
| 44 | public Thread(java.lang.ThreadGroup group, java.lang.Runnable target) { throw new RuntimeException("Stub!"); } |
| 45 | |
| 46 | public Thread(java.lang.String name) { throw new RuntimeException("Stub!"); } |
| 47 | |
| 48 | public Thread(java.lang.ThreadGroup group, java.lang.String name) { throw new RuntimeException("Stub!"); } |
| 49 | |
| 50 | public Thread(java.lang.Runnable target, java.lang.String name) { throw new RuntimeException("Stub!"); } |
| 51 | |
| 52 | public Thread(java.lang.ThreadGroup group, java.lang.Runnable target, java.lang.String name) { throw new RuntimeException("Stub!"); } |
| 53 | |
| 54 | public Thread(java.lang.ThreadGroup group, java.lang.Runnable target, java.lang.String name, long stackSize) { throw new RuntimeException("Stub!"); } |
| 55 | |
| 56 | public static native java.lang.Thread currentThread(); |
| 57 | |
| 58 | public static native void yield(); |
| 59 | |
| 60 | public static void sleep(long millis) throws java.lang.InterruptedException { throw new RuntimeException("Stub!"); } |
| 61 | |
| 62 | public static void sleep(long millis, int nanos) throws java.lang.InterruptedException { throw new RuntimeException("Stub!"); } |
| 63 | |
| 64 | protected java.lang.Object clone() throws java.lang.CloneNotSupportedException { throw new RuntimeException("Stub!"); } |
| 65 | |
| 66 | public synchronized void start() { throw new RuntimeException("Stub!"); } |
| 67 | |
| 68 | public void run() { throw new RuntimeException("Stub!"); } |
| 69 | |
| 70 | @Deprecated |
| 71 | public final void stop() { throw new RuntimeException("Stub!"); } |
| 72 | |
| 73 | @Deprecated |
| 74 | public final synchronized void stop(java.lang.Throwable obj) { throw new RuntimeException("Stub!"); } |
| 75 | |
| 76 | public void interrupt() { throw new RuntimeException("Stub!"); } |
| 77 | |
| 78 | public static native boolean interrupted(); |
| 79 | |
| 80 | public native boolean isInterrupted(); |
| 81 | |
| 82 | @Deprecated |
| 83 | public void destroy() { throw new RuntimeException("Stub!"); } |
| 84 | |
| 85 | public final boolean isAlive() { throw new RuntimeException("Stub!"); } |
| 86 | |
| 87 | @Deprecated |
| 88 | public final void suspend() { throw new RuntimeException("Stub!"); } |
| 89 | |
| 90 | @Deprecated |
| 91 | public final void resume() { throw new RuntimeException("Stub!"); } |
| 92 | |
| 93 | public final void setPriority(int newPriority) { throw new RuntimeException("Stub!"); } |
| 94 | |
| 95 | public final int getPriority() { throw new RuntimeException("Stub!"); } |
| 96 | |
| 97 | public final synchronized void setName(java.lang.String name) { throw new RuntimeException("Stub!"); } |
| 98 | |
| 99 | public final java.lang.String getName() { throw new RuntimeException("Stub!"); } |
| 100 | |
| 101 | public final java.lang.ThreadGroup getThreadGroup() { throw new RuntimeException("Stub!"); } |
| 102 | |
| 103 | public static int activeCount() { throw new RuntimeException("Stub!"); } |
| 104 | |
| 105 | public static int enumerate(java.lang.Thread[] tarray) { throw new RuntimeException("Stub!"); } |
| 106 | |
| 107 | @Deprecated |
| 108 | public int countStackFrames() { throw new RuntimeException("Stub!"); } |
| 109 | |
| 110 | public final void join(long millis) throws java.lang.InterruptedException { throw new RuntimeException("Stub!"); } |
| 111 | |
| 112 | public final void join(long millis, int nanos) throws java.lang.InterruptedException { throw new RuntimeException("Stub!"); } |
| 113 | |
| 114 | public final void join() throws java.lang.InterruptedException { throw new RuntimeException("Stub!"); } |
| 115 | |
| 116 | public static void dumpStack() { throw new RuntimeException("Stub!"); } |
| 117 | |
| 118 | public final void setDaemon(boolean on) { throw new RuntimeException("Stub!"); } |
| 119 | |
| 120 | public final boolean isDaemon() { throw new RuntimeException("Stub!"); } |
| 121 | |
| 122 | public final void checkAccess() { throw new RuntimeException("Stub!"); } |
| 123 | |
| 124 | public java.lang.String toString() { throw new RuntimeException("Stub!"); } |
| 125 | |
| 126 | public java.lang.ClassLoader getContextClassLoader() { throw new RuntimeException("Stub!"); } |
| 127 | |
| 128 | public void setContextClassLoader(java.lang.ClassLoader cl) { throw new RuntimeException("Stub!"); } |
| 129 | |
| 130 | public static native boolean holdsLock(java.lang.Object obj); |
| 131 | |
| 132 | public java.lang.StackTraceElement[] getStackTrace() { throw new RuntimeException("Stub!"); } |
| 133 | |
| 134 | public static java.util.Map<java.lang.Thread,java.lang.StackTraceElement[]> getAllStackTraces() { throw new RuntimeException("Stub!"); } |
| 135 | |
| 136 | public long getId() { throw new RuntimeException("Stub!"); } |
| 137 | |
| 138 | public java.lang.Thread.State getState() { throw new RuntimeException("Stub!"); } |
| 139 | |
| 140 | public static void setDefaultUncaughtExceptionHandler(java.lang.Thread.UncaughtExceptionHandler eh) { throw new RuntimeException("Stub!"); } |
| 141 | |
| 142 | public 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) |
| 146 | public 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) |
| 150 | public static UncaughtExceptionHandler getUncaughtExceptionPreHandler() { throw new RuntimeException("Stub!"); } |
| 151 | |
| 152 | public java.lang.Thread.UncaughtExceptionHandler getUncaughtExceptionHandler() { throw new RuntimeException("Stub!"); } |
| 153 | |
| 154 | public void setUncaughtExceptionHandler(java.lang.Thread.UncaughtExceptionHandler eh) { throw new RuntimeException("Stub!"); } |
| 155 | |
| 156 | public static final int MAX_PRIORITY = 10; // 0xa |
| 157 | |
| 158 | public static final int MIN_PRIORITY = 1; // 0x1 |
| 159 | |
| 160 | public static final int NORM_PRIORITY = 5; // 0x5 |
| 161 | @SuppressWarnings({"unchecked", "deprecation", "all"}) |
| 162 | public static enum State { |
| 163 | NEW, |
| 164 | RUNNABLE, |
| 165 | BLOCKED, |
| 166 | WAITING, |
| 167 | TIMED_WAITING, |
| 168 | TERMINATED; |
| 169 | } |
| 170 | |
| 171 | @SuppressWarnings({"unchecked", "deprecation", "all"}) |
| 172 | @java.lang.FunctionalInterface |
| 173 | public static interface UncaughtExceptionHandler { |
| 174 | |
| 175 | public void uncaughtException(java.lang.Thread t, java.lang.Throwable e); |
| 176 | } |
| 177 | |
| 178 | } |
| 179 | |