Class PlugInClassLoader
- java.lang.Object
-
- java.lang.ClassLoader
-
- java.security.SecureClassLoader
-
- java.net.URLClassLoader
-
- com.vividsolutions.jump.workbench.plugin.PlugInClassLoader
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
public class PlugInClassLoader extends URLClassLoader
-
-
Constructor Summary
Constructors Constructor Description PlugInClassLoader(ClassLoader parent)
PlugInClassLoader(URL[] urls)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addUrls(URL[] urls)
allow adding urls, any timeURL
getResource(String name)
THIS IS A WORKAROUND! java9 fails to resolve if the resource contains a leading slash e.g.Class<?>
loadClass(String name)
not really necessary now, but we keep it for reference for a future classloader per extension for allowing extensions to use differently versioned dependency jars in separate subfolders under lib/ext// -
Methods inherited from class java.net.URLClassLoader
addURL, close, definePackage, findClass, findResource, findResources, getPermissions, getResourceAsStream, getURLs, newInstance, newInstance
-
Methods inherited from class java.security.SecureClassLoader
defineClass, defineClass
-
Methods inherited from class java.lang.ClassLoader
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findClass, findLibrary, findLoadedClass, findResource, findSystemClass, getClassLoadingLock, getDefinedPackage, getDefinedPackages, getName, getPackage, getPackages, getParent, getPlatformClassLoader, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, getUnnamedModule, isRegisteredAsParallelCapable, loadClass, registerAsParallelCapable, resolveClass, resources, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
-
-
-
-
Constructor Detail
-
PlugInClassLoader
public PlugInClassLoader(ClassLoader parent)
-
PlugInClassLoader
public PlugInClassLoader(URL[] urls)
-
-
Method Detail
-
loadClass
public Class<?> loadClass(String name) throws ClassNotFoundException
not really necessary now, but we keep it for reference for a future classloader per extension for allowing extensions to use differently versioned dependency jars in separate subfolders under lib/ext// - Overrides:
loadClass
in classClassLoader
- Throws:
ClassNotFoundException
-
getResource
public URL getResource(String name)
THIS IS A WORKAROUND! java9 fails to resolve if the resource contains a leading slash e.g. /org/freevoice/jumpdbqueryextension/dbquerystrings.properties fails with null while org/freevoice/jumpdbqueryextension/dbquerystrings.properties will properly resolve to jar:file:lib/plus/jumpdbquery.jar!/org/freevoice/jumpdbqueryextension/dbquerystrings.properties- Overrides:
getResource
in classClassLoader
-
addUrls
public void addUrls(URL[] urls)
allow adding urls, any time- Parameters:
urls
- array of URLs to add
-
-