public interface ClassLoaderDelegateHook
ClassLoaderDelegate
.Modifier and Type | Method and Description |
---|---|
Class<?> |
postFindClass(String name,
BundleClassLoader classLoader,
BundleData data)
Called by a
ClassLoaderDelegate.findClass(String) method after delegating to the resolved constraints and
local bundle for a class load. |
String |
postFindLibrary(String name,
BundleClassLoader classLoader,
BundleData data)
Called by a
ClassLoaderDelegate after normal delegation. |
URL |
postFindResource(String name,
BundleClassLoader classLoader,
BundleData data)
Called by a
ClassLoaderDelegate after delegating to the resolved constraints and
local bundle for a resource load. |
Enumeration<URL> |
postFindResources(String name,
BundleClassLoader classLoader,
BundleData data)
Called by a
ClassLoaderDelegate after delegating to the resolved constraints and
local bundle for a resource load. |
Class<?> |
preFindClass(String name,
BundleClassLoader classLoader,
BundleData data)
Called by a
ClassLoaderDelegate.findClass(String) method before delegating to the resolved constraints and
local bundle for a class load. |
String |
preFindLibrary(String name,
BundleClassLoader classLoader,
BundleData data)
Called by a
ClassLoaderDelegate before normal delegation. |
URL |
preFindResource(String name,
BundleClassLoader classLoader,
BundleData data)
Called by a
#findResource(String) before delegating to the resolved constraints and
local bundle for a resource load. |
Enumeration<URL> |
preFindResources(String name,
BundleClassLoader classLoader,
BundleData data)
Called by a
ClassLoaderDelegate before delegating to the resolved constraints and
local bundle for a resource load. |
Class<?> preFindClass(String name, BundleClassLoader classLoader, BundleData data) throws ClassNotFoundException
ClassLoaderDelegate.findClass(String)
method before delegating to the resolved constraints and
local bundle for a class load. If this method returns null then normal delegation is done. If this method
returns a non-null value then the rest of the delegation process is skipped and the returned value is used.
If this method throws a ClassNotFoundException
then the calling
ClassLoaderDelegate.findClass(String)
method re-throws the exception.name
- the name of the class to findclassLoader
- the bundle class loaderdata
- the bundle dataClassNotFoundException
- to terminate the delegation and throw an exceptionClass<?> postFindClass(String name, BundleClassLoader classLoader, BundleData data) throws ClassNotFoundException
ClassLoaderDelegate.findClass(String)
method after delegating to the resolved constraints and
local bundle for a class load. This method will only be called if no class was found
from the normal delegation.name
- the name of the class to findclassLoader
- the bundle class loaderdata
- the bundle dataClassNotFoundException
- to terminate the delegation and throw an exceptionURL preFindResource(String name, BundleClassLoader classLoader, BundleData data) throws FileNotFoundException
#findResource(String)
before delegating to the resolved constraints and
local bundle for a resource load. If this method returns null then normal delegation is done.
If this method returns a non-null value then the rest of the delegation process is skipped and the returned value is used.
If this method throws an FileNotFoundException
then the delegation is terminated.name
- the name of the resource to findclassLoader
- the bundle class loaderdata
- the bundle dataFileNotFoundException
- to terminate the delegationURL postFindResource(String name, BundleClassLoader classLoader, BundleData data) throws FileNotFoundException
ClassLoaderDelegate
after delegating to the resolved constraints and
local bundle for a resource load. This method will only be called if no resource was found
from the normal delegation.name
- the name of the resource to findclassLoader
- the bundle class loaderdata
- the bundle dataFileNotFoundException
- to terminate the delegationEnumeration<URL> preFindResources(String name, BundleClassLoader classLoader, BundleData data) throws FileNotFoundException
ClassLoaderDelegate
before delegating to the resolved constraints and
local bundle for a resource load. If this method returns null then normal delegation is done.
If this method returns a non-null value then the rest of the delegation process is skipped and the returned value is used.
If this method throws an FileNotFoundException
then the delegation is terminatedname
- the name of the resource to findclassLoader
- the bundle class loaderdata
- the bundle dataFileNotFoundException
- to terminate the delegationEnumeration<URL> postFindResources(String name, BundleClassLoader classLoader, BundleData data) throws FileNotFoundException
ClassLoaderDelegate
after delegating to the resolved constraints and
local bundle for a resource load. This method will only be called if no resources were found
from the normal delegation.name
- the name of the resource to findclassLoader
- the bundle class loaderdata
- the bundle dataFileNotFoundException
- to terminate the delegationString preFindLibrary(String name, BundleClassLoader classLoader, BundleData data) throws FileNotFoundException
ClassLoaderDelegate
before normal delegation. If this method returns
a non-null value then the rest of the delegation process is skipped and the returned value
is used.name
- the name of the library to findclassLoader
- the bundle class loaderdata
- the bundle dataFileNotFoundException
- to terminate the delegationString postFindLibrary(String name, BundleClassLoader classLoader, BundleData data)
ClassLoaderDelegate
after normal delegation. This method will only be called
if no library was found from the normal delegation.name
- the name of the library to findclassLoader
- the bundle class loaderdata
- the bundle dataCopyright © 2007–2018 The Apache Software Foundation. All rights reserved.