|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.lang.ClassLoader
org.jboss.ejb3.common.classloader.PrimitiveAwareClassLoader
public class PrimitiveAwareClassLoader
PrimitiveAwareClassLoader
This is more of a hack to avoid checking for primitives at multiple places
while loading a class from a name.
The PrimitiveAwareClassLoader will first check whether the request
is to load a primitive. If it's a primitive then it returns back the appropriate
Class corresponding to the primitive. For all other requests, it redirects
the request to the parent classloader.
| Constructor Summary | |
|---|---|
PrimitiveAwareClassLoader(java.lang.ClassLoader parent)
|
|
| Method Summary | |
|---|---|
protected java.lang.Class<?> |
findClass(java.lang.String name)
As recommended in ClassLoader.findClass(java.lang.String), the findClass method
should be overriden by the custom classloaders. |
| Methods inherited from class java.lang.ClassLoader |
|---|
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, findResource, findResources, findSystemClass, getPackage, getPackages, getParent, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, 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 |
|---|
public PrimitiveAwareClassLoader(java.lang.ClassLoader parent)
parent - Parent classloader| Method Detail |
|---|
protected java.lang.Class<?> findClass(java.lang.String name)
throws java.lang.ClassNotFoundException
ClassLoader.findClass(java.lang.String), the findClass method
should be overriden by the custom classloaders. This method will first check whether
the requested name is a primitive. If yes, it returns the appropriate Class
for the primitive. If not, then it lets the parent handle it.
findClass in class java.lang.ClassLoaderjava.lang.ClassNotFoundException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||