public interface ClassLoadingStatsHook
ClasspathManager
class. This class allows
a hook to record statistics about classloading.Modifier and Type | Method and Description |
---|---|
void |
postFindLocalClass(String name,
Class<?> clazz,
ClasspathManager manager)
Gets called by a classpath manager during
ClasspathManager.findLocalClass(String) after
searching the local classloader for a class. |
void |
postFindLocalResource(String name,
URL resource,
ClasspathManager manager)
Gets called by a classpath manager during
ClasspathManager.findLocalResource(String) after
searching the local classloader for a resource. |
void |
preFindLocalClass(String name,
ClasspathManager manager)
Gets called by a classpath manager during
ClasspathManager.findLocalClass(String) before
searching the local classloader for a class. |
void |
preFindLocalResource(String name,
ClasspathManager manager)
Gets called by a classpath manager during
ClasspathManager.findLocalResource(String) before
searching the local classloader for a resource. |
void |
recordClassDefine(String name,
Class<?> clazz,
byte[] classbytes,
ClasspathEntry classpathEntry,
BundleEntry entry,
ClasspathManager manager)
Gets called by a classpath manager after an attempt is made to define a class.
|
void preFindLocalClass(String name, ClasspathManager manager) throws ClassNotFoundException
ClasspathManager.findLocalClass(String)
before
searching the local classloader for a class. A classpath manager will call this method for
each configured class loading stat hook.name
- the name of the requested classmanager
- the classpath manager used to find and load the requested classClassNotFoundException
- to prevent the requested class from loadingvoid postFindLocalClass(String name, Class<?> clazz, ClasspathManager manager) throws ClassNotFoundException
ClasspathManager.findLocalClass(String)
after
searching the local classloader for a class. A classpath manager will call this method for
each configured class loading stat hook.name
- the name of the requested classclazz
- the loaded class or null if not foundmanager
- the classpath manager used to find and load the requested classClassNotFoundException
void preFindLocalResource(String name, ClasspathManager manager)
ClasspathManager.findLocalResource(String)
before
searching the local classloader for a resource. A classpath manager will call this method for
each configured class loading stat hook.name
- the name of the requested resourcemanager
- the classpath manager used to find the requested resourcevoid postFindLocalResource(String name, URL resource, ClasspathManager manager)
ClasspathManager.findLocalResource(String)
after
searching the local classloader for a resource. A classpath manager will call this method for
each configured class loading stat hook.name
- the name of the requested resourceresource
- the URL to the requested resource or null if not foundmanager
- the classpath manager used to find the requested resourcevoid recordClassDefine(String name, Class<?> clazz, byte[] classbytes, ClasspathEntry classpathEntry, BundleEntry entry, ClasspathManager manager)
name
- the name of the class that got definedclazz
- the class object that got defined or null if an error occurred while defining a classclassbytes
- the class bytes used to define the classclasspathEntry
- the ClasspathEntry where the class bytes got read fromentry
- the BundleEntyr source of the class bytesmanager
- the classpath manager used to define the classCopyright © 2007–2018 The Apache Software Foundation. All rights reserved.