Package org.java.plugin.standard
Class StandardPluginClassLoader
java.lang.Object
java.lang.ClassLoader
java.security.SecureClassLoader
java.net.URLClassLoader
org.java.plugin.PluginClassLoader
org.java.plugin.standard.StandardPluginClassLoader
- All Implemented Interfaces:
Closeable,AutoCloseable
Standard implementation of plug-in class loader.
- Version:
- $Id: StandardPluginClassLoader.java,v 1.8 2007/04/07 12:39:50 ddimon Exp $
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static final class -
Constructor Summary
ConstructorsConstructorDescriptionStandardPluginClassLoader(PluginManager aManager, PluginDescriptor descr, ClassLoader parent) Creates class instance configured to load classes and resources for given plug-in. -
Method Summary
Modifier and TypeMethodDescriptionprotected FilecacheLibrary(URL libUrl, String libname) protected voidcheckClassVisibility(Class<?> cls, StandardPluginClassLoader requestor) protected voidprotected voidprotected voiddispose()Should release all resources acquired by this class loader instance.protected StringfindLibrary(String name) findResource(String name) protected URLfindResource(String name, StandardPluginClassLoader requestor, Set<String> seenPlugins) findResources(String name) protected voidfindResources(List<URL> result, String name, StandardPluginClassLoader requestor, Set<String> seenPlugins) protected booleanisResourceVisible(String name, URL url, StandardPluginClassLoader requestor) protected Class<?>protected voidRegistry data change notification.protected voidsetForeignClassLoadingOptimization(boolean value) protected voidsetLocalClassLoadingOptimization(boolean value) protected voidsetProbeParentLoaderLast(boolean value) protected voidsetStickySynchronizing(boolean value) Methods inherited from class org.java.plugin.PluginClassLoader
getPluginDescriptor, getPluginManager, toStringMethods inherited from class java.net.URLClassLoader
addURL, close, definePackage, findClass, getPermissions, getResourceAsStream, getURLs, newInstance, newInstanceMethods inherited from class java.security.SecureClassLoader
defineClass, defineClassMethods inherited from class java.lang.ClassLoader
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findClass, findLoadedClass, findResource, findSystemClass, getClassLoadingLock, getDefinedPackage, getDefinedPackages, getName, getPackage, getPackages, getParent, getPlatformClassLoader, getResource, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, getUnnamedModule, isRegisteredAsParallelCapable, loadClass, registerAsParallelCapable, resolveClass, resources, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
-
Constructor Details
-
StandardPluginClassLoader
public StandardPluginClassLoader(PluginManager aManager, PluginDescriptor descr, ClassLoader parent) Creates class instance configured to load classes and resources for given plug-in.- Parameters:
aManager- plug-in manager instancedescr- plug-in descriptorparent- parent class loader, usually this is JPF "host" application class loader
-
-
Method Details
-
collectImports
protected void collectImports() -
collectFilters
protected void collectFilters() -
pluginsSetChanged
protected void pluginsSetChanged()Description copied from class:PluginClassLoaderRegistry data change notification.- Specified by:
pluginsSetChangedin classPluginClassLoader- See Also:
-
dispose
protected void dispose()Description copied from class:PluginClassLoaderShould release all resources acquired by this class loader instance.- Specified by:
disposein classPluginClassLoader- See Also:
-
setProbeParentLoaderLast
protected void setProbeParentLoaderLast(boolean value) -
setStickySynchronizing
protected void setStickySynchronizing(boolean value) -
setLocalClassLoadingOptimization
protected void setLocalClassLoadingOptimization(boolean value) -
setForeignClassLoadingOptimization
protected void setForeignClassLoadingOptimization(boolean value) -
loadClass
- Overrides:
loadClassin classClassLoader- Throws:
ClassNotFoundException- See Also:
-
checkClassVisibility
protected void checkClassVisibility(Class<?> cls, StandardPluginClassLoader requestor) throws ClassNotFoundException - Throws:
ClassNotFoundException
-
findLibrary
- Overrides:
findLibraryin classClassLoader- See Also:
-
cacheLibrary
-
findResource
- Overrides:
findResourcein classURLClassLoader- See Also:
-
findResources
- Overrides:
findResourcesin classURLClassLoader- Throws:
IOException- See Also:
-
findResource
protected URL findResource(String name, StandardPluginClassLoader requestor, Set<String> seenPlugins) -
findResources
protected void findResources(List<URL> result, String name, StandardPluginClassLoader requestor, Set<String> seenPlugins) throws IOException - Throws:
IOException
-
isResourceVisible
-