com.bbn.swede.library.kazuki
Class VocabularyClassLoader

java.lang.Object
  extended byjava.lang.ClassLoader
      extended bycom.bbn.swede.library.kazuki.VocabularyClassLoader

public class VocabularyClassLoader
extends ClassLoader

A custom class loader that looks for SchemaGen vocabularies in the vocab package. If a requested vocabulary class is not found in that package, the standard class loading mechanism is invoked.


Nested Class Summary
 
Nested classes inherited from class java.lang.ClassLoader
 
Field Summary
 
Fields inherited from class java.lang.ClassLoader
 
Constructor Summary
VocabularyClassLoader(ClassLoader parent, String sPackageRoot)
          Creates a new vocabulary class loader that looks for vocabularies under a specified package root and defers to a specified parent class loader if it fails.
VocabularyClassLoader(String sPackageRoot)
          Creates a new vocabulary class loader that looks for vocabularies under a specified package root.
 
Method Summary
protected  Class findClass(String sClass)
           
 
Methods inherited from class java.lang.ClassLoader
clearAssertionStatus, 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

VocabularyClassLoader

public VocabularyClassLoader(String sPackageRoot)
Creates a new vocabulary class loader that looks for vocabularies under a specified package root. The current thread's context class loader is used as the parent.

Parameters:
sPackageRoot - The filesystem path of the folder containing the package structure to search for vocabulary classes

VocabularyClassLoader

public VocabularyClassLoader(ClassLoader parent,
                             String sPackageRoot)
Creates a new vocabulary class loader that looks for vocabularies under a specified package root and defers to a specified parent class loader if it fails.

Parameters:
sPackageRoot - The filesystem path of the folder containing the package structure to search for vocabulary classes
parent - The classloader to defer to if a vocabulary class is not found under sPackageRoot
Method Detail

findClass

protected Class findClass(String sClass)
                   throws ClassNotFoundException
Throws:
ClassNotFoundException


Copyright © 2004-2005 BBN Technologies. All Rights Reserved.