Package org.datanucleus.enhancer
Class EnhancerClassLoader
- java.lang.Object
-
- java.lang.ClassLoader
-
- org.datanucleus.enhancer.EnhancerClassLoader
-
public final class EnhancerClassLoader extends ClassLoader
ClassLoader for newly defined classes. Parent classloader is the context classloader obtained during instantiation of this class
-
-
Constructor Summary
Constructors Constructor Description EnhancerClassLoader()EnhancerClassLoader(ClassLoaderResolver iDelegate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddefineClass(String fullClassName, byte[] bytes, ClassLoaderResolver clr)Define a class in this ClassLoader.protected URLfindResource(String name)Overwrite to have an opportunity to find resources from the delegate ClassLoaderResolverClassloadClass(String name)Overwrite to have an opportunity to load classes from the delegate ClassLoaderResolver-
Methods inherited from class java.lang.ClassLoader
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findClass, findClass, findLibrary, findLoadedClass, findResource, findResources, findSystemClass, getClassLoadingLock, getDefinedPackage, getDefinedPackages, getName, getPackage, getPackages, getParent, getPlatformClassLoader, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, getUnnamedModule, isRegisteredAsParallelCapable, loadClass, registerAsParallelCapable, resolveClass, resources, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
-
-
-
-
Constructor Detail
-
EnhancerClassLoader
public EnhancerClassLoader()
-
EnhancerClassLoader
public EnhancerClassLoader(ClassLoaderResolver iDelegate)
-
-
Method Detail
-
defineClass
public void defineClass(String fullClassName, byte[] bytes, ClassLoaderResolver clr)
Define a class in this ClassLoader.- Parameters:
fullClassName- the class namebytes- the bytes representation of the classclr- the ClassLoaderResolver to load linked classes
-
loadClass
public Class loadClass(String name) throws ClassNotFoundException
Overwrite to have an opportunity to load classes from the delegate ClassLoaderResolver- Overrides:
loadClassin classClassLoader- Throws:
ClassNotFoundException
-
findResource
protected URL findResource(String name)
Overwrite to have an opportunity to find resources from the delegate ClassLoaderResolver- Overrides:
findResourcein classClassLoader
-
-