source: josm/trunk/src/org/openstreetmap/josm/plugins/DynamicURLClassLoader.java@ 14253

Last change on this file since 14253 was 14234, checked in by Don-vip, 6 years ago

see #16047, see #16682 - make PluginClassLoader extend DynamicURLClassLoader so that plugins can add URLs to it

  • Property svn:eol-style set to native
File size: 807 bytes
Line 
1// License: GPL. For details, see LICENSE file.
2package org.openstreetmap.josm.plugins;
3
4import java.net.URL;
5import java.net.URLClassLoader;
6
7/**
8 * ClassLoader that makes the {@link #addURL} method of {@link URLClassLoader} public.
9 *
10 * Like URLClassLoader, but allows to add more URLs after construction.
11 * @since 14234 (extracted from PluginHandler)
12 */
13public class DynamicURLClassLoader extends URLClassLoader {
14
15 /**
16 * Constructs a new {@code DynamicURLClassLoader}.
17 * @param urls the URLs from which to load classes and resources
18 * @param parent the parent class loader for delegation
19 */
20 public DynamicURLClassLoader(URL[] urls, ClassLoader parent) {
21 super(urls, parent);
22 }
23
24 @Override
25 public void addURL(URL url) {
26 super.addURL(url);
27 }
28}
Note: See TracBrowser for help on using the repository browser.