com.caucho.boot
Class JniLoader

java.lang.Object
  extended by java.lang.ClassLoader
      extended by java.security.SecureClassLoader
          extended by com.caucho.boot.JniLoader

public class JniLoader
extends java.security.SecureClassLoader

Class loader which checks for changes in class files and automatically picks up new jars.

DynamicClassLoaders can be chained creating one virtual class loader. From the perspective of the JDK, it's all one classloader. Internally, the class loader chain searches like a classpath.


Constructor Summary
JniLoader(Path resinHome)
          Create a new class loader.
 
Method Summary
protected  java.lang.Class<?> findClass(java.lang.String name)
          Load a class using this class loader
 java.lang.String findLibrary(java.lang.String name)
          Returns the full library path for the name.
protected  java.lang.Class<?> loadClass(java.lang.String name, boolean resolve)
          Load a class using this class loader
 
Methods inherited from class java.security.SecureClassLoader
defineClass, defineClass, getPermissions
 
Methods inherited from class java.lang.ClassLoader
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, 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

JniLoader

public JniLoader(Path resinHome)
Create a new class loader.

Parameters:
parent - parent class loader
Method Detail

loadClass

protected java.lang.Class<?> loadClass(java.lang.String name,
                                       boolean resolve)
                                throws java.lang.ClassNotFoundException
Load a class using this class loader

Overrides:
loadClass in class java.lang.ClassLoader
Parameters:
name - the classname to load
resolve - if true, resolve the class
Returns:
the loaded classes
Throws:
java.lang.ClassNotFoundException

findClass

protected java.lang.Class<?> findClass(java.lang.String name)
                                throws java.lang.ClassNotFoundException
Load a class using this class loader

Overrides:
findClass in class java.lang.ClassLoader
Parameters:
name - the classname using either '/' or '.'
Returns:
the loaded class
Throws:
java.lang.ClassNotFoundException

findLibrary

public java.lang.String findLibrary(java.lang.String name)
Returns the full library path for the name.

Overrides:
findLibrary in class java.lang.ClassLoader