
org.bitbucket.bradleysmithllc.etlunit.launcher.DelegatingClassLoader Maven / Gradle / Ivy
The newest version!
package org.bitbucket.bradleysmithllc.etlunit.launcher;
/*
* #%L
* etlunit-application-assembly
* %%
* Copyright (C) 2010 - 2023 bradleysmithllc
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import java.net.URLClassLoader;
import java.util.Enumeration;
public class DelegatingClassLoader extends URLClassLoader {
public DelegatingClassLoader(URL[] urls) {
super(urls);
}
@Override
protected Class> loadClass(String name, boolean resolve) throws ClassNotFoundException {
try {
return super.loadClass(name, resolve);
} catch (ClassNotFoundException cnfe) {
throw cnfe;
}
}
@Override
public URL getResource(String name) {
return super.getResource(name);
}
@Override
public Enumeration getResources(String name) throws IOException {
return super.getResources(name);
}
@Override
public InputStream getResourceAsStream(String name) {
return super.getResourceAsStream(name);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy