Package qupath.lib.gui
Class ExtensionClassLoader
java.lang.Object
java.lang.ClassLoader
java.security.SecureClassLoader
java.net.URLClassLoader
qupath.lib.gui.ExtensionClassLoader
- All Implemented Interfaces:
Closeable
,AutoCloseable
ClassLoader
for loading QuPath extensions and other jars from the user directory.- Author:
- Pete Bankhead
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Directory containing extensions.static ExtensionClassLoader
Get a singleton instance of theExtensionClassLoader
.void
refresh()
Ensure all Jars in the extensions directory (and one subdirectory down) are availableMethods inherited from class java.net.URLClassLoader
addURL, 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, getResource, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, getUnnamedModule, isRegisteredAsParallelCapable, loadClass, loadClass, registerAsParallelCapable, resolveClass, resources, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
-
Method Details
-
getInstance
Get a singleton instance of theExtensionClassLoader
.- Returns:
- Since:
- v0.5.0
-
getExtensionsDirectory
Directory containing extensions. This can contain any jars - all will be added to the search path when starting QuPath.- Returns:
-
refresh
public void refresh()Ensure all Jars in the extensions directory (and one subdirectory down) are available -
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classURLClassLoader
- Throws:
IOException
-