no.sesat.search.site.config
Class ResourceClassLoader

java.lang.Object
  extended by java.lang.ClassLoader
      extended by no.sesat.search.site.config.ResourceClassLoader
Direct Known Subclasses:
SpiClassLoader

public abstract class ResourceClassLoader
extends ClassLoader

ClassLoader abstraction to handle loading classes across skins.

Version:
$Id: ResourceClassLoader.java 7225 2009-04-09 00:32:20Z ssmiweve $

Nested Class Summary
static interface ResourceClassLoader.Context
          Context needed by this class.
 
Constructor Summary
ResourceClassLoader(ResourceClassLoader.Context context)
          Creates a new resource class loader for a site.
ResourceClassLoader(ResourceClassLoader.Context context, ClassLoader parent)
           
 
Method Summary
protected  Class<?> findClass(String className)
          Finds classes using a BytecodeLoader.
protected abstract  String getJarName()
          Returns the jar file the class must be contained in.
 
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, 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

ResourceClassLoader

public ResourceClassLoader(ResourceClassLoader.Context context)
Creates a new resource class loader for a site.

Parameters:
context - the context.

ResourceClassLoader

public ResourceClassLoader(ResourceClassLoader.Context context,
                           ClassLoader parent)
Method Detail

getJarName

protected abstract String getJarName()
Returns the jar file the class must be contained in. If null, all jar-files and classes available to the class loader of the resource servlet are searched.

Returns:
the name of the jar file.

findClass

protected Class<?> findClass(String className)
                      throws ClassNotFoundException
Finds classes using a BytecodeLoader.

Overrides:
findClass in class ClassLoader
Parameters:
className - the clas to find
Returns:
the class.
Throws:
ClassNotFoundException - if the class cannot be found in this class loader.


Copyright © 2005-2009 Schibsted ASA. All Rights Reserved.