|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.ClassLoader
net.sf.fikin.classmarshaling.MarshaledClassLoader
public class MarshaledClassLoader
Class loader used to resolve required classes during de-serialization.
It supports class lookup from an internal map with classes and their bytecodes.
It does class lookup through a given class loader and if the class is not found, it will look into supplied map of classes.
The map contains the class name as key and class bytecode (byte[]) as value. created on Aug 2, 2005
Constructor Summary | |
---|---|
MarshaledClassLoader(java.util.Map _classMap)
Initialize the classloader with a map with class bytecodes The the parent classloader will be defined by Classloader.getSystemClassLoader() . |
|
MarshaledClassLoader(java.util.Map _classMap,
java.lang.ClassLoader parent)
initialize the classloader with the given map with class bytecodes and specified classloader as parent |
Method Summary | |
---|---|
protected java.lang.Class |
loadClass(java.lang.String name,
boolean resolve)
attempts to load the class via parent class loader. |
Methods inherited from class java.lang.ClassLoader |
---|
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findClass, findLibrary, findLoadedClass, findResource, 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 |
---|
public MarshaledClassLoader(java.util.Map _classMap)
The the parent classloader will be defined by
Classloader.getSystemClassLoader()
.
_classMap
- to be usedpublic MarshaledClassLoader(java.util.Map _classMap, java.lang.ClassLoader parent)
_classMap
- to be usedparent
- parent classloaderMethod Detail |
---|
protected java.lang.Class loadClass(java.lang.String name, boolean resolve) throws java.lang.ClassNotFoundException
If this fails it tries to locate the class in the supplied map with classes.
loadClass
in class java.lang.ClassLoader
name
- The binary name of the classresolve
- If true then resolve the class
Class
object
java.lang.ClassNotFoundException
- if the class could not be found by the
parent classloader is not present in the internal map
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |