org.datanucleus.enhancer
Class EnhancerClassLoader

java.lang.Object
  extended by java.lang.ClassLoader
      extended by org.datanucleus.enhancer.EnhancerClassLoader

public final class EnhancerClassLoader
extends java.lang.ClassLoader

ClassLoader for newly defined classes. Parent classloader is the context classloader obtained during instantiation of this class


Constructor Summary
EnhancerClassLoader()
           
EnhancerClassLoader(org.datanucleus.ClassLoaderResolver iDelegate)
           
 
Method Summary
 void defineClass(java.lang.String fullClassName, byte[] bytes, org.datanucleus.ClassLoaderResolver clr)
          Define a class in this ClassLoader.
protected  java.net.URL findResource(java.lang.String name)
          Overwrite to have an opportunity to find resources from the delegate ClassLoaderResolver
 java.lang.Class loadClass(java.lang.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, findLibrary, findLoadedClass, findResources, findSystemClass, getPackage, getPackages, getParent, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EnhancerClassLoader

public EnhancerClassLoader()

EnhancerClassLoader

public EnhancerClassLoader(org.datanucleus.ClassLoaderResolver iDelegate)
Method Detail

defineClass

public void defineClass(java.lang.String fullClassName,
                        byte[] bytes,
                        org.datanucleus.ClassLoaderResolver clr)
Define a class in this ClassLoader.

Parameters:
fullClassName - the class name
bytes - the bytes representation of the class
clr - the ClassLoaderResolver to load linked classes

loadClass

public java.lang.Class loadClass(java.lang.String name)
                          throws java.lang.ClassNotFoundException
Overwrite to have an opportunity to load classes from the delegate ClassLoaderResolver

Overrides:
loadClass in class java.lang.ClassLoader
Throws:
java.lang.ClassNotFoundException

findResource

protected java.net.URL findResource(java.lang.String name)
Overwrite to have an opportunity to find resources from the delegate ClassLoaderResolver

Overrides:
findResource in class java.lang.ClassLoader


Copyright © 2011. All Rights Reserved.