public class JniLoader
extends java.security.SecureClassLoader
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 and Description |
---|
JniLoader(Path resinHome)
Create a new class loader.
|
Modifier and Type | Method and Description |
---|---|
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
|
defineClass, defineClass, getPermissions
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findLoadedClass, findResource, findResources, findSystemClass, getClassLoadingLock, getPackage, getPackages, getParent, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, registerAsParallelCapable, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
public JniLoader(Path resinHome)
parent
- parent class loaderprotected java.lang.Class<?> loadClass(java.lang.String name, boolean resolve) throws java.lang.ClassNotFoundException
loadClass
in class java.lang.ClassLoader
name
- the classname to loadresolve
- if true, resolve the classjava.lang.ClassNotFoundException
protected java.lang.Class<?> findClass(java.lang.String name) throws java.lang.ClassNotFoundException
findClass
in class java.lang.ClassLoader
name
- the classname using either '/' or '.'java.lang.ClassNotFoundException
public java.lang.String findLibrary(java.lang.String name)
findLibrary
in class java.lang.ClassLoader