1 /*
2  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3  *
4  * This code is free software; you can redistribute it and/or modify it
5  * under the terms of the GNU General Public License version 2 only, as
6  * published by the Free Software Foundation.  Oracle designates this
7  * particular file as subject to the "Classpath" exception as provided
8  * by Oracle in the LICENSE file that accompanied this code.
9  *
10  * This code is distributed in the hope that it will be useful, but WITHOUT
11  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
13  * version 2 for more details (a copy is included in the LICENSE file that
14  * accompanied this code).
15  *
16  * You should have received a copy of the GNU General Public License version
17  * 2 along with this work; if not, write to the Free Software Foundation,
18  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
19  *
20  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
21  * or visit www.oracle.com if you need additional information or have any
22  * questions.
23  */
24 
25 /*
26  * This file is available under and governed by the GNU General Public
27  * License version 2 only, as published by the Free Software Foundation.
28  * However, the following notice accompanied the original version of this
29  * file:
30  *
31  * Written by Doug Lea with assistance from members of JCP JSR-166
32  * Expert Group and released to the public domain, as explained at
33  * http://creativecommons.org/publicdomain/zero/1.0/
34  */
35 
36 package java.util.concurrent;
37 
38 import android.compat.annotation.UnsupportedAppUsage;
39 
40 @SuppressWarnings({"unchecked", "deprecation", "all"})
41 public class Executors {
42 
Executors()43     private Executors() {
44         throw new RuntimeException("Stub!");
45     }
46 
newFixedThreadPool(int nThreads)47     public static java.util.concurrent.ExecutorService newFixedThreadPool(int nThreads) {
48         throw new RuntimeException("Stub!");
49     }
50 
newWorkStealingPool(int parallelism)51     public static java.util.concurrent.ExecutorService newWorkStealingPool(int parallelism) {
52         throw new RuntimeException("Stub!");
53     }
54 
newWorkStealingPool()55     public static java.util.concurrent.ExecutorService newWorkStealingPool() {
56         throw new RuntimeException("Stub!");
57     }
58 
newFixedThreadPool( int nThreads, java.util.concurrent.ThreadFactory threadFactory)59     public static java.util.concurrent.ExecutorService newFixedThreadPool(
60             int nThreads, java.util.concurrent.ThreadFactory threadFactory) {
61         throw new RuntimeException("Stub!");
62     }
63 
newSingleThreadExecutor()64     public static java.util.concurrent.ExecutorService newSingleThreadExecutor() {
65         throw new RuntimeException("Stub!");
66     }
67 
newSingleThreadExecutor( java.util.concurrent.ThreadFactory threadFactory)68     public static java.util.concurrent.ExecutorService newSingleThreadExecutor(
69             java.util.concurrent.ThreadFactory threadFactory) {
70         throw new RuntimeException("Stub!");
71     }
72 
newCachedThreadPool()73     public static java.util.concurrent.ExecutorService newCachedThreadPool() {
74         throw new RuntimeException("Stub!");
75     }
76 
newCachedThreadPool( java.util.concurrent.ThreadFactory threadFactory)77     public static java.util.concurrent.ExecutorService newCachedThreadPool(
78             java.util.concurrent.ThreadFactory threadFactory) {
79         throw new RuntimeException("Stub!");
80     }
81 
newSingleThreadScheduledExecutor()82     public static java.util.concurrent.ScheduledExecutorService newSingleThreadScheduledExecutor() {
83         throw new RuntimeException("Stub!");
84     }
85 
newSingleThreadScheduledExecutor( java.util.concurrent.ThreadFactory threadFactory)86     public static java.util.concurrent.ScheduledExecutorService newSingleThreadScheduledExecutor(
87             java.util.concurrent.ThreadFactory threadFactory) {
88         throw new RuntimeException("Stub!");
89     }
90 
newScheduledThreadPool( int corePoolSize)91     public static java.util.concurrent.ScheduledExecutorService newScheduledThreadPool(
92             int corePoolSize) {
93         throw new RuntimeException("Stub!");
94     }
95 
newScheduledThreadPool( int corePoolSize, java.util.concurrent.ThreadFactory threadFactory)96     public static java.util.concurrent.ScheduledExecutorService newScheduledThreadPool(
97             int corePoolSize, java.util.concurrent.ThreadFactory threadFactory) {
98         throw new RuntimeException("Stub!");
99     }
100 
unconfigurableExecutorService( java.util.concurrent.ExecutorService executor)101     public static java.util.concurrent.ExecutorService unconfigurableExecutorService(
102             java.util.concurrent.ExecutorService executor) {
103         throw new RuntimeException("Stub!");
104     }
105 
106     public static java.util.concurrent.ScheduledExecutorService
unconfigurableScheduledExecutorService( java.util.concurrent.ScheduledExecutorService executor)107             unconfigurableScheduledExecutorService(
108                     java.util.concurrent.ScheduledExecutorService executor) {
109         throw new RuntimeException("Stub!");
110     }
111 
defaultThreadFactory()112     public static java.util.concurrent.ThreadFactory defaultThreadFactory() {
113         throw new RuntimeException("Stub!");
114     }
115 
privilegedThreadFactory()116     public static java.util.concurrent.ThreadFactory privilegedThreadFactory() {
117         throw new RuntimeException("Stub!");
118     }
119 
callable(java.lang.Runnable task, T result)120     public static <T> java.util.concurrent.Callable<T> callable(java.lang.Runnable task, T result) {
121         throw new RuntimeException("Stub!");
122     }
123 
callable( java.lang.Runnable task)124     public static java.util.concurrent.Callable<java.lang.Object> callable(
125             java.lang.Runnable task) {
126         throw new RuntimeException("Stub!");
127     }
128 
callable( java.security.PrivilegedAction<?> action)129     public static java.util.concurrent.Callable<java.lang.Object> callable(
130             java.security.PrivilegedAction<?> action) {
131         throw new RuntimeException("Stub!");
132     }
133 
callable( java.security.PrivilegedExceptionAction<?> action)134     public static java.util.concurrent.Callable<java.lang.Object> callable(
135             java.security.PrivilegedExceptionAction<?> action) {
136         throw new RuntimeException("Stub!");
137     }
138 
privilegedCallable( java.util.concurrent.Callable<T> callable)139     public static <T> java.util.concurrent.Callable<T> privilegedCallable(
140             java.util.concurrent.Callable<T> callable) {
141         throw new RuntimeException("Stub!");
142     }
143 
privilegedCallableUsingCurrentClassLoader( java.util.concurrent.Callable<T> callable)144     public static <T> java.util.concurrent.Callable<T> privilegedCallableUsingCurrentClassLoader(
145             java.util.concurrent.Callable<T> callable) {
146         throw new RuntimeException("Stub!");
147     }
148 
149     @SuppressWarnings({"unchecked", "deprecation", "all"})
150     private static class DefaultThreadFactory implements java.util.concurrent.ThreadFactory {
151 
DefaultThreadFactory()152         DefaultThreadFactory() {
153             throw new RuntimeException("Stub!");
154         }
155 
newThread(java.lang.Runnable r)156         public java.lang.Thread newThread(java.lang.Runnable r) {
157             throw new RuntimeException("Stub!");
158         }
159 
160         private final java.lang.ThreadGroup group;
161 
162         {
163             group = null;
164         }
165 
166         private final java.lang.String namePrefix;
167 
168         {
169             namePrefix = null;
170         }
171 
172         private static final java.util.concurrent.atomic.AtomicInteger poolNumber;
173 
174         static {
175             poolNumber = null;
176         }
177 
178         private final java.util.concurrent.atomic.AtomicInteger threadNumber;
179 
180         {
181             threadNumber = null;
182         }
183     }
184 
185     @SuppressWarnings({"unchecked", "deprecation", "all"})
186     private static class DelegatedExecutorService
187             extends java.util.concurrent.AbstractExecutorService {
188 
DelegatedExecutorService(java.util.concurrent.ExecutorService executor)189         DelegatedExecutorService(java.util.concurrent.ExecutorService executor) {
190             throw new RuntimeException("Stub!");
191         }
192 
execute(java.lang.Runnable command)193         public void execute(java.lang.Runnable command) {
194             throw new RuntimeException("Stub!");
195         }
196 
shutdown()197         public void shutdown() {
198             throw new RuntimeException("Stub!");
199         }
200 
shutdownNow()201         public java.util.List<java.lang.Runnable> shutdownNow() {
202             throw new RuntimeException("Stub!");
203         }
204 
isShutdown()205         public boolean isShutdown() {
206             throw new RuntimeException("Stub!");
207         }
208 
isTerminated()209         public boolean isTerminated() {
210             throw new RuntimeException("Stub!");
211         }
212 
awaitTermination(long timeout, java.util.concurrent.TimeUnit unit)213         public boolean awaitTermination(long timeout, java.util.concurrent.TimeUnit unit)
214                 throws java.lang.InterruptedException {
215             throw new RuntimeException("Stub!");
216         }
217 
submit(java.lang.Runnable task)218         public java.util.concurrent.Future<?> submit(java.lang.Runnable task) {
219             throw new RuntimeException("Stub!");
220         }
221 
submit(java.util.concurrent.Callable<T> task)222         public <T> java.util.concurrent.Future<T> submit(java.util.concurrent.Callable<T> task) {
223             throw new RuntimeException("Stub!");
224         }
225 
submit(java.lang.Runnable task, T result)226         public <T> java.util.concurrent.Future<T> submit(java.lang.Runnable task, T result) {
227             throw new RuntimeException("Stub!");
228         }
229 
invokeAll( java.util.Collection<? extends java.util.concurrent.Callable<T>> tasks)230         public <T> java.util.List<java.util.concurrent.Future<T>> invokeAll(
231                 java.util.Collection<? extends java.util.concurrent.Callable<T>> tasks)
232                 throws java.lang.InterruptedException {
233             throw new RuntimeException("Stub!");
234         }
235 
invokeAll( java.util.Collection<? extends java.util.concurrent.Callable<T>> tasks, long timeout, java.util.concurrent.TimeUnit unit)236         public <T> java.util.List<java.util.concurrent.Future<T>> invokeAll(
237                 java.util.Collection<? extends java.util.concurrent.Callable<T>> tasks,
238                 long timeout,
239                 java.util.concurrent.TimeUnit unit)
240                 throws java.lang.InterruptedException {
241             throw new RuntimeException("Stub!");
242         }
243 
invokeAny( java.util.Collection<? extends java.util.concurrent.Callable<T>> tasks)244         public <T> T invokeAny(
245                 java.util.Collection<? extends java.util.concurrent.Callable<T>> tasks)
246                 throws java.util.concurrent.ExecutionException, java.lang.InterruptedException {
247             throw new RuntimeException("Stub!");
248         }
249 
invokeAny( java.util.Collection<? extends java.util.concurrent.Callable<T>> tasks, long timeout, java.util.concurrent.TimeUnit unit)250         public <T> T invokeAny(
251                 java.util.Collection<? extends java.util.concurrent.Callable<T>> tasks,
252                 long timeout,
253                 java.util.concurrent.TimeUnit unit)
254                 throws java.util.concurrent.ExecutionException, java.lang.InterruptedException,
255                         java.util.concurrent.TimeoutException {
256             throw new RuntimeException("Stub!");
257         }
258 
259         private final java.util.concurrent.ExecutorService e;
260 
261         {
262             e = null;
263         }
264     }
265 
266     @SuppressWarnings({"unchecked", "deprecation", "all"})
267     private static class DelegatedScheduledExecutorService
268             extends java.util.concurrent.Executors.DelegatedExecutorService
269             implements java.util.concurrent.ScheduledExecutorService {
270 
DelegatedScheduledExecutorService(java.util.concurrent.ScheduledExecutorService executor)271         DelegatedScheduledExecutorService(java.util.concurrent.ScheduledExecutorService executor) {
272             super(null);
273             throw new RuntimeException("Stub!");
274         }
275 
schedule( java.lang.Runnable command, long delay, java.util.concurrent.TimeUnit unit)276         public java.util.concurrent.ScheduledFuture<?> schedule(
277                 java.lang.Runnable command, long delay, java.util.concurrent.TimeUnit unit) {
278             throw new RuntimeException("Stub!");
279         }
280 
schedule( java.util.concurrent.Callable<V> callable, long delay, java.util.concurrent.TimeUnit unit)281         public <V> java.util.concurrent.ScheduledFuture<V> schedule(
282                 java.util.concurrent.Callable<V> callable,
283                 long delay,
284                 java.util.concurrent.TimeUnit unit) {
285             throw new RuntimeException("Stub!");
286         }
287 
scheduleAtFixedRate( java.lang.Runnable command, long initialDelay, long period, java.util.concurrent.TimeUnit unit)288         public java.util.concurrent.ScheduledFuture<?> scheduleAtFixedRate(
289                 java.lang.Runnable command,
290                 long initialDelay,
291                 long period,
292                 java.util.concurrent.TimeUnit unit) {
293             throw new RuntimeException("Stub!");
294         }
295 
scheduleWithFixedDelay( java.lang.Runnable command, long initialDelay, long delay, java.util.concurrent.TimeUnit unit)296         public java.util.concurrent.ScheduledFuture<?> scheduleWithFixedDelay(
297                 java.lang.Runnable command,
298                 long initialDelay,
299                 long delay,
300                 java.util.concurrent.TimeUnit unit) {
301             throw new RuntimeException("Stub!");
302         }
303 
304         private final java.util.concurrent.ScheduledExecutorService e;
305 
306         {
307             e = null;
308         }
309     }
310 
311     @SuppressWarnings({"unchecked", "deprecation", "all"})
312     private static class FinalizableDelegatedExecutorService
313             extends java.util.concurrent.Executors.DelegatedExecutorService {
314 
FinalizableDelegatedExecutorService(java.util.concurrent.ExecutorService executor)315         FinalizableDelegatedExecutorService(java.util.concurrent.ExecutorService executor) {
316             super(null);
317             throw new RuntimeException("Stub!");
318         }
319 
finalize()320         protected void finalize() {
321             throw new RuntimeException("Stub!");
322         }
323     }
324 
325     @SuppressWarnings({"unchecked", "deprecation", "all"})
326     private static final class PrivilegedCallable<T> implements java.util.concurrent.Callable<T> {
327 
PrivilegedCallable(java.util.concurrent.Callable<T> task)328         PrivilegedCallable(java.util.concurrent.Callable<T> task) {
329             throw new RuntimeException("Stub!");
330         }
331 
call()332         public T call() throws java.lang.Exception {
333             throw new RuntimeException("Stub!");
334         }
335 
336         final java.security.AccessControlContext acc;
337 
338         {
339             acc = null;
340         }
341 
342         final java.util.concurrent.Callable<T> task;
343 
344         {
345             task = null;
346         }
347     }
348 
349     @SuppressWarnings({"unchecked", "deprecation", "all"})
350     private static final class PrivilegedCallableUsingCurrentClassLoader<T>
351             implements java.util.concurrent.Callable<T> {
352 
PrivilegedCallableUsingCurrentClassLoader(java.util.concurrent.Callable<T> task)353         PrivilegedCallableUsingCurrentClassLoader(java.util.concurrent.Callable<T> task) {
354             throw new RuntimeException("Stub!");
355         }
356 
call()357         public T call() throws java.lang.Exception {
358             throw new RuntimeException("Stub!");
359         }
360 
361         final java.security.AccessControlContext acc;
362 
363         {
364             acc = null;
365         }
366 
367         final java.lang.ClassLoader ccl;
368 
369         {
370             ccl = null;
371         }
372 
373         final java.util.concurrent.Callable<T> task;
374 
375         {
376             task = null;
377         }
378     }
379 
380     @SuppressWarnings({"unchecked", "deprecation", "all"})
381     private static class PrivilegedThreadFactory
382             extends java.util.concurrent.Executors.DefaultThreadFactory {
383 
PrivilegedThreadFactory()384         PrivilegedThreadFactory() {
385             throw new RuntimeException("Stub!");
386         }
387 
newThread(java.lang.Runnable r)388         public java.lang.Thread newThread(java.lang.Runnable r) {
389             throw new RuntimeException("Stub!");
390         }
391 
392         final java.security.AccessControlContext acc;
393 
394         {
395             acc = null;
396         }
397 
398         final java.lang.ClassLoader ccl;
399 
400         {
401             ccl = null;
402         }
403     }
404 
405     @SuppressWarnings({"unchecked", "deprecation", "all"})
406     private static final class RunnableAdapter<T> implements java.util.concurrent.Callable<T> {
407 
RunnableAdapter(java.lang.Runnable task, T result)408         RunnableAdapter(java.lang.Runnable task, T result) {
409             throw new RuntimeException("Stub!");
410         }
411 
call()412         public T call() {
413             throw new RuntimeException("Stub!");
414         }
415 
416         private final T result;
417 
418         {
419             result = null;
420         }
421 
422         @UnsupportedAppUsage
423         private final java.lang.Runnable task;
424 
425         {
426             task = null;
427         }
428     }
429 }
430