Commit 17f61c1d authored by Andy Wilkinson's avatar Andy Wilkinson

Update javadoc of LaunchedURLClassLoader to describe delegation model

Closes gh-3864
parent b74c10ba
......@@ -62,6 +62,13 @@ public class LaunchedURLClassLoader extends URLClassLoader {
return null;
}
/**
* Gets the resource with the given {@code name}.
* <p>
* Unlike a standard {@link ClassLoader}, this method will first search the root class
* loader. If the resource is not found, this method will call
* {@link #findResource(String)}.
*/
@Override
public URL getResource(String name) {
URL url = null;
......@@ -96,6 +103,13 @@ public class LaunchedURLClassLoader extends URLClassLoader {
return getURLs().length > 0;
}
/**
* Gets the resources with the given {@code name}.
* <p>
* Returns a combination of the resources found by {@link #findResources(String)} and
* from {@link ClassLoader#getResources(String) getResources(String)} on the root
* class loader, if any.
*/
@Override
public Enumeration<URL> getResources(String name) throws IOException {
if (this.rootClassLoader == null) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment