insensa.test
Class TestClassLoader

java.lang.Object
  extended by java.lang.ClassLoader
      extended by java.security.SecureClassLoader
          extended by java.net.URLClassLoader
              extended by insensa.test.TestClassLoader

public class TestClassLoader
extends java.net.URLClassLoader

Author:
dennis

Field Summary
private  java.util.Map<java.lang.String,java.lang.String> nativeMap
           
 
Constructor Summary
TestClassLoader(java.net.URL[] urls)
           
TestClassLoader(java.net.URL[] urls, java.lang.ClassLoader parent)
           
TestClassLoader(java.net.URL[] urls, java.lang.ClassLoader parent, java.net.URLStreamHandlerFactory factory)
           
 
Method Summary
 void addNativeUrl(java.lang.String name, java.lang.String absPath)
           
protected  java.lang.Class<?> findClass(java.lang.String name)
           
protected  java.lang.String findLibrary(java.lang.String libname)
           
 java.net.URL findResource(java.lang.String name)
           
 java.util.Enumeration<java.net.URL> findResources(java.lang.String name)
           
 void setNativeMap(java.util.Map<java.lang.String,java.lang.String> nativeMap)
           
 
Methods inherited from class java.net.URLClassLoader
addURL, definePackage, getPermissions, getURLs, newInstance, newInstance
 
Methods inherited from class java.security.SecureClassLoader
defineClass, defineClass
 
Methods inherited from class java.lang.ClassLoader
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findLoadedClass, findSystemClass, getPackage, getPackages, getParent, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, loadClass, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

nativeMap

private java.util.Map<java.lang.String,java.lang.String> nativeMap
Constructor Detail

TestClassLoader

public TestClassLoader(java.net.URL[] urls)
Parameters:
urls -

TestClassLoader

public TestClassLoader(java.net.URL[] urls,
                       java.lang.ClassLoader parent)
Parameters:
urls -
parent -

TestClassLoader

public TestClassLoader(java.net.URL[] urls,
                       java.lang.ClassLoader parent,
                       java.net.URLStreamHandlerFactory factory)
Parameters:
urls -
parent -
factory -
Method Detail

findClass

protected java.lang.Class<?> findClass(java.lang.String name)
                                throws java.lang.ClassNotFoundException
Overrides:
findClass in class java.net.URLClassLoader
Throws:
java.lang.ClassNotFoundException
See Also:
URLClassLoader.findClass(java.lang.String)

findResource

public java.net.URL findResource(java.lang.String name)
Overrides:
findResource in class java.net.URLClassLoader
See Also:
URLClassLoader.findResource(java.lang.String)

findResources

public java.util.Enumeration<java.net.URL> findResources(java.lang.String name)
                                                  throws java.io.IOException
Overrides:
findResources in class java.net.URLClassLoader
Throws:
java.io.IOException
See Also:
URLClassLoader.findResources(java.lang.String)

addNativeUrl

public void addNativeUrl(java.lang.String name,
                         java.lang.String absPath)

setNativeMap

public void setNativeMap(java.util.Map<java.lang.String,java.lang.String> nativeMap)
Parameters:
nativeMap - the nativeMap to set

findLibrary

protected java.lang.String findLibrary(java.lang.String libname)
Overrides:
findLibrary in class java.lang.ClassLoader
See Also:
ClassLoader.findLibrary(java.lang.String)