org.apache.sling.commons.classloader
Interface DynamicClassLoaderManager
- All Known Implementing Classes:
- DynamicClassLoaderManagerImpl
public interface DynamicClassLoaderManager
The dynamic class loader manager is a central
service managing all dynamic class loaders.
It provides a class loader that can be used by
bundles requiring access to all publically available
classes.
The default implementation uses the package admin
service to load classes and resources. The search
path can be extended by providing
DynamicClassLoaderProvider
s.
Keep in mind, that the class loader might get invalid.
This happens for example, if the class loader loaded
a class from a bundle which has been updated in the
meantime. Or a dynamic class loader provider has changed.
In these cases, the dynamic class loader manager service
is unregistered and reregistered again, so you should
reget your classloader and invalidate loaded objects
whenever this happens.
getDynamicClassLoader
java.lang.ClassLoader getDynamicClassLoader()
- The dynamic class loader.
Copyright © 2007-2012 The Apache Software Foundation. All Rights Reserved.