org.jasig.portal.car
Class CarClassLoader

java.lang.Object
  extended by java.lang.ClassLoader
      extended by java.security.SecureClassLoader
          extended by org.jasig.portal.car.CarClassLoader

public class CarClassLoader
extends SecureClassLoader

Loads classes and resources from installed CARs via the CarResources class. If classes are visible via the parent class loader then they will be used in place of those in the CARs. This is a singleton so that we have a single unified class namespace for all car resources preventing linkage errors and class cast exceptions.

Version:
$Revision: 19776 $
Author:
Mark Boyd mark.boyd@engineer.com

Field Summary
static String RCS_ID
           
 
Method Summary
 Class findClass(String name)
          Implement the overloading of findClass to return classes that are available from installed CAR files.
 URL findResource(String res)
          Returns a URL pointing to a car resource if a suitable resource is found in the loaded set of CAR files or null if one is not found.
 
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, findResources, 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

RCS_ID

public static final String RCS_ID
See Also:
Constant Field Values
Method Detail

findClass

public Class findClass(String name)
                throws ClassNotFoundException
Implement the overloading of findClass to return classes that are available from installed CAR files. Class loading precedes with the parent classloader first which delegates to this class loader if the classes aren't found.

Overrides:
findClass in class ClassLoader
Throws:
ClassNotFoundException

findResource

public URL findResource(String res)
Returns a URL pointing to a car resource if a suitable resource is found in the loaded set of CAR files or null if one is not found.

Overrides:
findResource in class ClassLoader


Copyright © 2010 Jasig. All Rights Reserved.