## php.java.bridge
Class DynamicJavaBridgeClassLoader

    java.lang.Object
      java.lang.ClassLoader
          java.security.SecureClassLoader
              php.java.bridge.DynamicClassLoader
                  php.java.bridge.DynamicJavaBridgeClassLoader

    public class DynamicJavaBridgeClassLoader

extends DynamicClassLoader

The bridge class loader which uses the DynamicClassLoader when possible.

Author:
  jostb

Nested Class Summary
`static class` `DynamicJavaBridgeClassLoader.JarLibraryPath` Holds a checked JarLibraryPath entry

Field Summary

Fields inherited from class php.java.bridge.DynamicClassLoader
`defaultCacheTimeout, defaultLazy`

Method Summary
`static DynamicJavaBridgeClassLoader.JarLibraryPath` `checkJarLibraryPath(java.lang.String rawPath, java.lang.String rawContextDir)` Set the library path for the bridge instance.
`void` `clear()` Clear the loader so that it can be used in new requests.
`void` `clearCaches()` Clear all loader caches.
`DynamicJavaBridgeClassLoader` `clearVMLoader()` The VM associates a map with each loader to speed up Class.forName().
`static void` `initClassLoader(java.lang.String phpConfigDir)` Deprecated.
`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 neccessary.
`static DynamicJavaBridgeClassLoader` `newInstance(java.lang.ClassLoader parent)` Create an instance of the dynamic java bridge classloader It may return null due to security restrictions on certain systems, so don't use this method directly but call: new JavaBridgeClassLoader(bridge, DynamicJavaBridgeClassLoader.newInstance()) instead.
`void` `reset()` Reset to initial state.
`java.lang.String` `toString()`
`void` `updateJarLibraryPath(DynamicJavaBridgeClassLoader.JarLibraryPath path)` Update the library path for the bridge instance.
`void` `updateJarLibraryPath(java.lang.String rawPath, java.lang.String rawContextDir)` Update the library path for the bridge instance.

Methods inherited from class php.java.bridge.DynamicClassLoader
`addURL, addURL, addURLs, addURLs, addURLs, addURLs, clearCache, debugMsg, findResource, findResources, getStringFromURLArray, getURLArrayFromString, invalidate, invalidate, setCacheTimeout, setLazy, setUrlClassLoaderFactory`

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, wait, wait, wait`

Method Detail

### checkJarLibraryPath

    public static DynamicJavaBridgeClassLoader.JarLibraryPath checkJarLibraryPath(java.lang.String rawPath,
                                                                                  java.lang.String rawContextDir)
                                                                           throws java.io.IOException

  Set the library path for the bridge instance. Examples: setJarLibPath(";file:///tmp/test.jar;file:///tmp/my.jar");
  setJarLibPath("|file:c:/t.jar|http://.../a.jar|jar:file:///tmp/x.jar!/");
  The first char must be the token separator.

  Parameters:
    `rawPath` - The path
    `rawContextDir` - The context dir, e.g. /usr/lib/php/extensions
  Throws:
    `java.io.IOException`

### updateJarLibraryPath

    public void updateJarLibraryPath(java.lang.String rawPath,
                                     java.lang.String rawContextDir)
                              throws java.io.IOException

  Update the library path for the bridge instance. Examples: setJarLibPath(";file:///tmp/test.jar;file:///tmp/my.jar");
  setJarLibPath("|file:c:/t.jar|http://.../a.jar|jar:file:///tmp/x.jar!/");
  The first char must be the token separator.

  Parameters:
    `rawPath` - The path
    `rawContextDir` - The context dir, e.g. /usr/lib/php/extensions
  Throws:
    `java.io.IOException`

### updateJarLibraryPath

    public void updateJarLibraryPath(DynamicJavaBridgeClassLoader.JarLibraryPath path)

  Update the library path for the bridge instance.

  Parameters:
    `path` - the checked JarLibraryPath
  Throws:
    `java.io.IOException`
  See Also:
    `checkJarLibraryPath(String, String)`

### initClassLoader

    public static void initClassLoader(java.lang.String phpConfigDir)

  Deprecated.

### clearVMLoader

    public DynamicJavaBridgeClassLoader clearVMLoader()

  The VM associates a map with each loader to speed up Class.forName(). Since our loader can shrink, we discard the VM cache when clear() or reset() is called.

  Returns:
    A new instance which should be used instead of the current instance.

### reset

    public void reset()

  Reset to initial state.

### clearCaches

    public void clearCaches()

  Clear all loader caches.

### clear

    public void clear()

  Clear the loader so that it can be used in new requests.

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Object`

### loadClass

    public java.lang.Class loadClass(java.lang.String name)
                              throws java.lang.ClassNotFoundException

  Description copied from class: `DynamicClassLoader`
  I have decided to override loadClass instead of findClass, so that this method will actually get to re-load classes if neccessary. Otherwise, the Java system would call the final method "getLoadedClass(name)", (i.e. use it's own caching) without dynamically re-loading classes if neccessary.

  Overrides:
    `loadClass` in class `DynamicClassLoader`
  Throws:
    `java.lang.ClassNotFoundException`

### newInstance

    public static DynamicJavaBridgeClassLoader newInstance(java.lang.ClassLoader parent)

  Create an instance of the dynamic java bridge classloader It may return null due to security restrictions on certain systems, so don't use this method directly but call: new JavaBridgeClassLoader(bridge, DynamicJavaBridgeClassLoader.newInstance()) instead.