Package de.hybris.bootstrap.loader
Class YURLClassLoader
java.lang.Object
java.lang.ClassLoader
java.security.SecureClassLoader
java.net.URLClassLoader
de.hybris.bootstrap.loader.YURLClassLoader
- All Implemented Interfaces:
Closeable,AutoCloseable
- Direct Known Subclasses:
PlatformInPlaceClassLoader
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddClassPathURLs(List<URL> urls, String classpath) protected URLbuildURL(File f, YURLClassLoader.TYPE type) voidNull out any static or final fields from loaded classes, as a workaround for apparent garbage collection bugsprotected Class<?>findResource(String name) protected Class<?>overridden to maintain a list of classes that are loaded by this (or a child) Classloader to be able to clear references of this classes (during stop() ) In addition to that we hold a list of ALL loaded classes as a cache.voidstart()voidstop()Stops this classloader.Methods inherited from class java.net.URLClassLoader
addURL, close, definePackage, findResources, 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, findLibrary, 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
-
YURLClassLoader
-
YURLClassLoader
-
-
Method Details
-
findClass
- Overrides:
findClassin classURLClassLoader- Throws:
ClassNotFoundException
-
loadClass
overridden to maintain a list of classes that are loaded by this (or a child) Classloader to be able to clear references of this classes (during stop() ) In addition to that we hold a list of ALL loaded classes as a cache.- Overrides:
loadClassin classClassLoader- Throws:
ClassNotFoundException
-
findResource
- Overrides:
findResourcein classURLClassLoader
-
start
public void start() -
stop
public void stop()Stops this classloader. this will "stop" the underlaying platform which means that- the connection pools are closed
- all timer tasks stopped (if cronjob extension is installed)
- the cache is cleared
- all fields of static classes are nulled (due to GC problems)
-
clearAllReferences
public void clearAllReferences()Null out any static or final fields from loaded classes, as a workaround for apparent garbage collection bugs -
addClassPathURLs
- Throws:
MalformedURLException
-
buildURL
- Throws:
MalformedURLException
-