Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## php.java.bridge
Class SimpleJavaBridgeClassLoader

    java.lang.Object
      php.java.bridge.SimpleJavaBridgeClassLoader

Direct Known Subclasses:
  JavaBridgeClassLoader

    public class SimpleJavaBridgeClassLoader

extends java.lang.Object

A bridge pattern which allows us to vary the class loader as run-time. The decision is based on whether we are allowed to use a dynamic classloader or not (cl==null) or security exception at run-time.

See Also:
  `ClassLoader`

Field Summary
`static java.lang.ClassLoader` | `DEFAULT_CLASS_LOADER` The default class loader used by the PHP/Java Bridge

Constructor Summary
`SimpleJavaBridgeClassLoader()` Create a bridge class loader using the default class loader.

Method Summary
`void` | `clear()` clear the input vectors
`void` | `clearCaches()` clear all loader caches but not the input vectors
`java.lang.Class` | `forName(java.lang.String name)` Load a class.
`java.lang.ClassLoader` | `getClassLoader()` Only for internal use
`void` | `reset()` reset loader to the initial state
`void` | `setClassLoader(DynamicJavaBridgeClassLoader loader)` Set a DynamicJavaBridgeClassLoader.
`void` | `updateJarLibraryPath(java.lang.String path, java.lang.String extensionDir)` Append the path to the current library path

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### DEFAULT_CLASS_LOADER

    public static final java.lang.ClassLoader DEFAULT_CLASS_LOADER

  The default class loader used by the PHP/Java Bridge

Constructor Detail

### SimpleJavaBridgeClassLoader

    public SimpleJavaBridgeClassLoader()

  Create a bridge class loader using the default class loader.

Method Detail

### setClassLoader

    public void setClassLoader(DynamicJavaBridgeClassLoader loader)
                        throws java.io.IOException

  Set a DynamicJavaBridgeClassLoader.

  Parameters:
    `loader` - The dynamic class loader
  Throws:
    `java.io.IOException`

### updateJarLibraryPath

    public void updateJarLibraryPath(java.lang.String path,
                                     java.lang.String extensionDir)
                              throws java.io.IOException

  Append the path to the current library path

  Parameters:
    `path` - A file or url list, separated by ';'
    `extensionDir` - Usually ini_get("extension_dir");
  Throws:
    `java.io.IOException`

### getClassLoader

    public java.lang.ClassLoader getClassLoader()

  Only for internal use

  Returns:
    the classloader

### reset

    public void reset()

  reset loader to the initial state

### clearCaches

    public void clearCaches()

  clear all loader caches but not the input vectors

### forName

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

  Load a class.

  Parameters:
    `name` - The class, for example java.lang.String
  Returns:
    the class
  Throws:
    `java.lang.ClassNotFoundException`

### clear

    public void clear()

  clear the input vectors

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD