no.sesat.search.site.config
Class SpiClassLoader

java.lang.Object
  extended by java.lang.ClassLoader
      extended by no.sesat.search.site.config.ResourceClassLoader
          extended by no.sesat.search.site.config.SpiClassLoader

public final class SpiClassLoader
extends ResourceClassLoader

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

Nested Class Summary
static interface SpiClassLoader.Context
          The context this class needs.
 
Constructor Summary
SpiClassLoader(SpiClassLoader.Context context)
          Creates a new spi class loader.
 
Method Summary
protected  Class<?> findClass(String className)
          Finds classes using a BytecodeLoader.
protected  String getJarName()
          Returns the jar file the class must be contained in.
 Class<?> loadClass(String name, boolean resolve)
          Tries to load class, delegating to parent class loaders in the following order.
 String toString()
           
 
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, wait, wait, wait
 

Constructor Detail

SpiClassLoader

public SpiClassLoader(SpiClassLoader.Context context)
Creates a new spi class loader.

Parameters:
context - the context.
Method Detail

toString

public String toString()
Overrides:
toString in class Object

loadClass

public Class<?> loadClass(String name,
                          boolean resolve)
                   throws ClassNotFoundException
Tries to load class, delegating to parent class loaders in the following order.

Overrides:
loadClass in class ClassLoader
Parameters:
name - the name of the class to find.
resolve - if to resolve it.
Returns:
the class
Throws:
ClassNotFoundException - if the class could not be found in any class loader.

getJarName

protected 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.

Specified by:
getJarName in class ResourceClassLoader
Returns:
the name of the jar file.

findClass

protected Class<?> findClass(String className)
                      throws ClassNotFoundException
Description copied from class: ResourceClassLoader
Finds classes using a BytecodeLoader.

Overrides:
findClass in class ResourceClassLoader
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.