|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.lang.ClassLoader
ewe.util.mClassLoader
| Field Summary | |
protected Hashtable |
loaded
A cache of already loaded classes. |
| Constructor Summary | |
mClassLoader()
|
|
| Method Summary | |
static void |
addClassLoader(ClassLoader loader)
Add a ClassLoader to the WeakSet of application classLoaders. |
void |
authorize(mClassLoader other)
This passes authority from this ClassLoader to another. |
protected void |
cacheClass(String className,
Class aClass)
Override this to provide class caching. |
protected Class |
findCachedClass(String className)
Override this to provide class caching. |
protected ByteArray |
findClassBytes(String className)
You can override this method OR you can override getInputStreamFor(String className) - which is called by this method. |
static Class |
getClass(String name,
Class requestor)
This is a utility method used to load a Class by another Class which itself may have been loaded via a ClassLoader. |
static int |
getClassLoaders(Vector dest)
Get the current set of application ClassLoaders into a Vector, or simply count the number of active ClassLoaders. |
protected Stream |
getInputStreamFor(String className)
This is called by findClassBytes by default and you can override this if necessary instead of overriding findClassBytes(). |
protected Class |
loadClass(String className,
boolean resolve)
This method will check for system classes and cached classes before calling findClassBytes(). |
static Object |
newInstance(String className,
Class requestor)
This tries to get a new instance of a class. |
Stream |
openResource(String resourceName)
This is used to get a resource which may be dependant on the how the class was loaded. |
static Stream |
openResource(String resourceName,
Class requestor)
This tries to open a resource via the class loader of the requestor. |
static void |
removeClassLoader(ClassLoader loader)
|
| Methods inherited from class java.lang.ClassLoader |
defineClass, loadClass, resolveClass |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, toString |
| Field Detail |
protected Hashtable loaded
| Constructor Detail |
public mClassLoader()
| Method Detail |
public final void authorize(mClassLoader other)
throws SecurityException
SecurityExceptionpublic static void addClassLoader(ClassLoader loader)
public static void removeClassLoader(ClassLoader loader)
public static int getClassLoaders(Vector dest)
dest - A Vector to hold the class loaders. If this is not null it will be cleared before
the classes are placed in it. If it is null then this just counts the number of active ClassLoaders.
protected Class loadClass(String className,
boolean resolve)
throws ClassNotFoundException
loadClass in class ClassLoaderClassNotFoundExceptionprotected Class findCachedClass(String className)
protected void cacheClass(String className,
Class aClass)
protected ByteArray findClassBytes(String className)
protected Stream getInputStreamFor(String className)
public Stream openResource(String resourceName)
public static Class getClass(String name,
Class requestor)
public static Object newInstance(String className,
Class requestor)
public static Stream openResource(String resourceName,
Class requestor)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||