1 /*
2  * Copyright (C) 2014 The Android Open Source Project
3  * Copyright (c) 1997, 2016, 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 package sun.misc;
28 
29 import android.compat.annotation.UnsupportedAppUsage;
30 
31 @SuppressWarnings({"unchecked", "deprecation", "all"})
32 public class URLClassPath {
33 
URLClassPath( java.net.URL[] urls, java.net.URLStreamHandlerFactory factory, java.security.AccessControlContext acc)34     public URLClassPath(
35             java.net.URL[] urls,
36             java.net.URLStreamHandlerFactory factory,
37             java.security.AccessControlContext acc) {
38         throw new RuntimeException("Stub!");
39     }
40 
URLClassPath(java.net.URL[] urls)41     public URLClassPath(java.net.URL[] urls) {
42         throw new RuntimeException("Stub!");
43     }
44 
URLClassPath(java.net.URL[] urls, java.security.AccessControlContext acc)45     public URLClassPath(java.net.URL[] urls, java.security.AccessControlContext acc) {
46         throw new RuntimeException("Stub!");
47     }
48 
closeLoaders()49     public synchronized java.util.List<java.io.IOException> closeLoaders() {
50         throw new RuntimeException("Stub!");
51     }
52 
addURL(java.net.URL url)53     public synchronized void addURL(java.net.URL url) {
54         throw new RuntimeException("Stub!");
55     }
56 
getURLs()57     public java.net.URL[] getURLs() {
58         throw new RuntimeException("Stub!");
59     }
60 
findResource(java.lang.String name, boolean check)61     public java.net.URL findResource(java.lang.String name, boolean check) {
62         throw new RuntimeException("Stub!");
63     }
64 
getResource(java.lang.String name, boolean check)65     public sun.misc.Resource getResource(java.lang.String name, boolean check) {
66         throw new RuntimeException("Stub!");
67     }
68 
findResources(java.lang.String name, boolean check)69     public java.util.Enumeration<java.net.URL> findResources(java.lang.String name, boolean check) {
70         throw new RuntimeException("Stub!");
71     }
72 
getResource(java.lang.String name)73     public sun.misc.Resource getResource(java.lang.String name) {
74         throw new RuntimeException("Stub!");
75     }
76 
getResources( java.lang.String name, boolean check)77     public java.util.Enumeration<sun.misc.Resource> getResources(
78             java.lang.String name, boolean check) {
79         throw new RuntimeException("Stub!");
80     }
81 
getResources(java.lang.String name)82     public java.util.Enumeration<sun.misc.Resource> getResources(java.lang.String name) {
83         throw new RuntimeException("Stub!");
84     }
85 
initLookupCache(java.lang.ClassLoader loader)86     synchronized void initLookupCache(java.lang.ClassLoader loader) {
87         throw new RuntimeException("Stub!");
88     }
89 
disableAllLookupCaches()90     static void disableAllLookupCaches() {
91         throw new RuntimeException("Stub!");
92     }
93 
getLookupCacheURLs(java.lang.ClassLoader loader)94     private java.net.URL[] getLookupCacheURLs(java.lang.ClassLoader loader) {
95         throw new RuntimeException("Stub!");
96     }
97 
getLookupCacheForClassLoader( java.lang.ClassLoader loader, java.lang.String name)98     private static int[] getLookupCacheForClassLoader(
99             java.lang.ClassLoader loader, java.lang.String name) {
100         throw new RuntimeException("Stub!");
101     }
102 
knownToNotExist0( java.lang.ClassLoader loader, java.lang.String className)103     private static boolean knownToNotExist0(
104             java.lang.ClassLoader loader, java.lang.String className) {
105         throw new RuntimeException("Stub!");
106     }
107 
knownToNotExist(java.lang.String className)108     synchronized boolean knownToNotExist(java.lang.String className) {
109         throw new RuntimeException("Stub!");
110     }
111 
getLookupCache(java.lang.String name)112     private synchronized int[] getLookupCache(java.lang.String name) {
113         throw new RuntimeException("Stub!");
114     }
115 
ensureLoaderOpened(int index)116     private boolean ensureLoaderOpened(int index) {
117         throw new RuntimeException("Stub!");
118     }
119 
validateLookupCache(int index, java.lang.String urlNoFragString)120     private synchronized void validateLookupCache(int index, java.lang.String urlNoFragString) {
121         throw new RuntimeException("Stub!");
122     }
123 
getNextLoader(int[] cache, int index)124     private synchronized sun.misc.URLClassPath.Loader getNextLoader(int[] cache, int index) {
125         throw new RuntimeException("Stub!");
126     }
127 
getLoader(int index)128     private synchronized sun.misc.URLClassPath.Loader getLoader(int index) {
129         throw new RuntimeException("Stub!");
130     }
131 
getLoader(java.net.URL url)132     private sun.misc.URLClassPath.Loader getLoader(java.net.URL url) throws java.io.IOException {
133         throw new RuntimeException("Stub!");
134     }
135 
push(java.net.URL[] us)136     private void push(java.net.URL[] us) {
137         throw new RuntimeException("Stub!");
138     }
139 
pathToURLs(java.lang.String path)140     public static java.net.URL[] pathToURLs(java.lang.String path) {
141         throw new RuntimeException("Stub!");
142     }
143 
checkURL(java.net.URL url)144     public java.net.URL checkURL(java.net.URL url) {
145         throw new RuntimeException("Stub!");
146     }
147 
check(java.net.URL url)148     static void check(java.net.URL url) throws java.io.IOException {
149         throw new RuntimeException("Stub!");
150     }
151 
152     private static final boolean DEBUG;
153 
154     static {
155         DEBUG = false;
156     }
157 
158     private static final boolean DEBUG_LOOKUP_CACHE;
159 
160     static {
161         DEBUG_LOOKUP_CACHE = false;
162     }
163 
164     private static final boolean DISABLE_ACC_CHECKING;
165 
166     static {
167         DISABLE_ACC_CHECKING = false;
168     }
169 
170     private static final boolean DISABLE_JAR_CHECKING;
171 
172     static {
173         DISABLE_JAR_CHECKING = false;
174     }
175 
176     static final java.lang.String JAVA_VERSION;
177 
178     static {
179         JAVA_VERSION = null;
180     }
181 
182     static final java.lang.String USER_AGENT_JAVA_VERSION = "UA-Java-Version";
183 
184     private final java.security.AccessControlContext acc;
185 
186     {
187         acc = null;
188     }
189 
190     private boolean closed = false;
191 
192     private java.net.URLStreamHandler jarHandler;
193 
194     @UnsupportedAppUsage
195     java.util.HashMap<java.lang.String, sun.misc.URLClassPath.Loader> lmap;
196 
197     @UnsupportedAppUsage
198     java.util.ArrayList<sun.misc.URLClassPath.Loader> loaders;
199 
200     private static volatile boolean lookupCacheEnabled = false;
201 
202     private java.lang.ClassLoader lookupCacheLoader;
203 
204     private java.net.URL[] lookupCacheURLs;
205 
206     private java.util.ArrayList<java.net.URL> path;
207 
208     @UnsupportedAppUsage java.util.Stack<java.net.URL> urls;
209 
210     @SuppressWarnings({"unchecked", "deprecation", "all"})
211     private static class FileLoader extends sun.misc.URLClassPath.Loader {
212 
FileLoader(java.net.URL url)213         FileLoader(java.net.URL url) throws java.io.IOException {
214             super(null);
215             throw new RuntimeException("Stub!");
216         }
217 
findResource(java.lang.String name, boolean check)218         java.net.URL findResource(java.lang.String name, boolean check) {
219             throw new RuntimeException("Stub!");
220         }
221 
getResource(java.lang.String name, boolean check)222         sun.misc.Resource getResource(java.lang.String name, boolean check) {
223             throw new RuntimeException("Stub!");
224         }
225 
226         private java.io.File dir;
227     }
228 
229     @SuppressWarnings({"unchecked", "deprecation", "all"})
230     static class JarLoader extends sun.misc.URLClassPath.Loader {
231 
JarLoader( java.net.URL url, java.net.URLStreamHandler jarHandler, java.util.HashMap<java.lang.String, sun.misc.URLClassPath.Loader> loaderMap, java.security.AccessControlContext acc)232         JarLoader(
233                 java.net.URL url,
234                 java.net.URLStreamHandler jarHandler,
235                 java.util.HashMap<java.lang.String, sun.misc.URLClassPath.Loader> loaderMap,
236                 java.security.AccessControlContext acc)
237                 throws java.io.IOException {
238             super(null);
239             throw new RuntimeException("Stub!");
240         }
241 
close()242         public void close() throws java.io.IOException {
243             throw new RuntimeException("Stub!");
244         }
245 
246         @UnsupportedAppUsage
getJarFile()247         java.util.jar.JarFile getJarFile() {
248             throw new RuntimeException("Stub!");
249         }
250 
isOptimizable(java.net.URL url)251         private boolean isOptimizable(java.net.URL url) {
252             throw new RuntimeException("Stub!");
253         }
254 
ensureOpen()255         private void ensureOpen() throws java.io.IOException {
256             throw new RuntimeException("Stub!");
257         }
258 
checkJar(java.util.jar.JarFile jar)259         static java.util.jar.JarFile checkJar(java.util.jar.JarFile jar)
260                 throws java.io.IOException {
261             throw new RuntimeException("Stub!");
262         }
263 
getJarFile(java.net.URL url)264         private java.util.jar.JarFile getJarFile(java.net.URL url) throws java.io.IOException {
265             throw new RuntimeException("Stub!");
266         }
267 
getIndex()268         sun.misc.JarIndex getIndex() {
269             throw new RuntimeException("Stub!");
270         }
271 
checkResource( java.lang.String name, boolean check, java.util.jar.JarEntry entry)272         sun.misc.Resource checkResource(
273                 java.lang.String name, boolean check, java.util.jar.JarEntry entry) {
274             throw new RuntimeException("Stub!");
275         }
276 
validIndex(java.lang.String name)277         boolean validIndex(java.lang.String name) {
278             throw new RuntimeException("Stub!");
279         }
280 
findResource(java.lang.String name, boolean check)281         java.net.URL findResource(java.lang.String name, boolean check) {
282             throw new RuntimeException("Stub!");
283         }
284 
getResource(java.lang.String name, boolean check)285         sun.misc.Resource getResource(java.lang.String name, boolean check) {
286             throw new RuntimeException("Stub!");
287         }
288 
getResource( java.lang.String name, boolean check, java.util.Set<java.lang.String> visited)289         sun.misc.Resource getResource(
290                 java.lang.String name, boolean check, java.util.Set<java.lang.String> visited) {
291             throw new RuntimeException("Stub!");
292         }
293 
getClassPath()294         java.net.URL[] getClassPath() throws java.io.IOException {
295             throw new RuntimeException("Stub!");
296         }
297 
parseExtensionsDependencies()298         private void parseExtensionsDependencies() throws java.io.IOException {
299             throw new RuntimeException("Stub!");
300         }
301 
parseClassPath(java.net.URL base, java.lang.String value)302         private java.net.URL[] parseClassPath(java.net.URL base, java.lang.String value)
303                 throws java.net.MalformedURLException {
304             throw new RuntimeException("Stub!");
305         }
306 
307         private final java.security.AccessControlContext acc;
308 
309         {
310             acc = null;
311         }
312 
313         private boolean closed = false;
314 
315         private final java.net.URL csu;
316 
317         {
318             csu = null;
319         }
320 
321         private java.net.URLStreamHandler handler;
322 
323         private sun.misc.JarIndex index;
324 
325         private java.util.jar.JarFile jar;
326 
327         private final java.util.HashMap<java.lang.String, sun.misc.URLClassPath.Loader> lmap;
328 
329         {
330             lmap = null;
331         }
332 
333         private sun.misc.MetaIndex metaIndex;
334     }
335 
336     @SuppressWarnings({"unchecked", "deprecation", "all"})
337     private static class Loader implements java.io.Closeable {
338 
Loader(java.net.URL url)339         Loader(java.net.URL url) {
340             throw new RuntimeException("Stub!");
341         }
342 
getBaseURL()343         java.net.URL getBaseURL() {
344             throw new RuntimeException("Stub!");
345         }
346 
findResource(java.lang.String name, boolean check)347         java.net.URL findResource(java.lang.String name, boolean check) {
348             throw new RuntimeException("Stub!");
349         }
350 
getResource(java.lang.String name, boolean check)351         sun.misc.Resource getResource(java.lang.String name, boolean check) {
352             throw new RuntimeException("Stub!");
353         }
354 
getResource(java.lang.String name)355         sun.misc.Resource getResource(java.lang.String name) {
356             throw new RuntimeException("Stub!");
357         }
358 
close()359         public void close() throws java.io.IOException {
360             throw new RuntimeException("Stub!");
361         }
362 
getClassPath()363         java.net.URL[] getClassPath() throws java.io.IOException {
364             throw new RuntimeException("Stub!");
365         }
366 
367         private final java.net.URL base;
368 
369         {
370             base = null;
371         }
372 
373         private java.util.jar.JarFile jarfile;
374     }
375 }
376