|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.ClassLoader
java.security.SecureClassLoader
php.java.bridge.DynamicClassLoader
public class DynamicClassLoader
This class implements a class loader, which keeps track of a dynamic list of other delegate URLClassLoaders It is possible to change the list of these Classloaders during execution. The classloaders themselves, as well as their corresponding classes are globally cached.
In case of file:// URLs, this classloader also handles reloading of Jar-Files once they are modified. This is possible without restarting the JVM It keeps track of the latest file modification times, and reloads Jar files if neccessary. It is also possible to add an URL pointing to a directory of simple class files. This is slow, though, and only recommended for quick and dirty development use since it will *always* reload
Copyright: PHP-License
http://sourceforge.net/projects/php-java-bridge
Field Summary | |
---|---|
static long |
defaultCacheTimeout
By default minumum file modification check interval is 2 seconds, that should be fast enough :) |
static boolean |
defaultLazy
By default lazy classpath addition |
Method Summary | |
---|---|
static void |
destroyObserver()
Destroy the temp file observer. |
static void |
invalidate(java.lang.String classpath)
Invalidates a given classpath, so that the corresponding classloader gets reloaded. |
static void |
invalidate(java.net.URL[] urls)
Invalidates a given classpath, so that the corresponding classloader gets reloaded. |
java.lang.Class |
loadClass(java.lang.String name)
I have decided to override loadClass instead of findClass, so that this method will actually get to re-load classes if necessary. |
Methods inherited from class java.lang.ClassLoader |
---|
clearAssertionStatus, getParent, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static long defaultCacheTimeout
public static boolean defaultLazy
Method Detail |
---|
public static void invalidate(java.net.URL[] urls)
urls
- The urls.public static void invalidate(java.lang.String classpath)
classpath
- public static final void destroyObserver()
public java.lang.Class loadClass(java.lang.String name) throws java.lang.ClassNotFoundException
loadClass
in class java.lang.ClassLoader
name
- The class name
java.lang.ClassNotFoundException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |