org.apache.sling.scripting.jsp.jasper
Class IsolatedClassLoader

java.lang.Object
  extended by java.lang.ClassLoader
      extended by java.security.SecureClassLoader
          extended by org.apache.sling.scripting.jsp.jasper.IsolatedClassLoader

public final class IsolatedClassLoader
extends java.security.SecureClassLoader

The IsolatedClassLoader class loads classes through the class loader writer


Constructor Summary
IsolatedClassLoader(IOProvider ioProvider)
           
 
Method Summary
protected  java.lang.Class<?> findClass(java.lang.String name)
          Finds and loads the class with the specified name from the class path.
 java.lang.Class<?> loadClass(java.lang.String name, boolean resolve)
          Loads the class from this ClassLoader.
 
Methods inherited from class java.security.SecureClassLoader
defineClass, defineClass, getPermissions
 
Methods inherited from class java.lang.ClassLoader
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findLibrary, 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

IsolatedClassLoader

public IsolatedClassLoader(IOProvider ioProvider)
Method Detail

loadClass

public final java.lang.Class<?> loadClass(java.lang.String name,
                                          boolean resolve)
                                   throws java.lang.ClassNotFoundException
Loads the class from this ClassLoader. If the class does not exist in this one, we check the parent. Please note that this is the exact opposite of the ClassLoader spec. We use it to work around inconsistent class loaders from third party vendors.

Overrides:
loadClass in class java.lang.ClassLoader
Parameters:
name - the name of the class
resolve - if true then resolve the class
Returns:
the resulting Class object
Throws:
java.lang.ClassNotFoundException - if the class could not be found

findClass

protected java.lang.Class<?> findClass(java.lang.String name)
                                throws java.lang.ClassNotFoundException
Finds and loads the class with the specified name from the class path.

Overrides:
findClass in class java.lang.ClassLoader
Parameters:
name - the name of the class
Returns:
the resulting class
Throws:
java.lang.ClassNotFoundException - If the named class could not be found or if this class loader has already been destroyed.


Copyright © 2007-2012 The Apache Software Foundation. All Rights Reserved.