Main Page | Packages | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | Related Pages

Sct.SearchClassLoader Class Reference

A SearchClassLoader is a bit different to a normal one It looks for classes with a given name in any package. More...

Collaboration diagram for Sct.SearchClassLoader:

Collaboration graph
[legend]
List of all members.

Public Member Functions

Class loadClass (String name, Class[] prototype) throws ClassNotFoundException

Static Public Member Functions

SearchClassLoader instance ()
void main (String[] args)
void find (String name)

Private Member Functions

void addToMap (String name, Class c, Class[] prototype)
Class findInMap (String name, Class[] prototype)
boolean checkClass (Class c, Class[] prototype)
Class findClassInParent (String name, Class[] prototype)
Class findClassInPackages (String name, Class[] prototype)
Class findClassInClassPath (String name, Class[] prototype)
Class findInDir (String fileName, String dirName, Class[] prototype)
Class findInDir (String fileName, String parentDir, File dir, Class[] prototype)
Class findInZipFile (String classFileName, String cpElement, Class[] prototype)
Class findInJarFile (String classFileName, String cpElement, Class[] prototype)
Class findInZipFile (ZipFile f, String classFileName, Class[] prototype)

Private Attributes

HashMap cache = new HashMap()

Static Private Attributes

SearchClassLoader loader = new SearchClassLoader()

Detailed Description

A SearchClassLoader is a bit different to a normal one It looks for classes with a given name in any package.

It caches results by the asked for name and prototype to improve performance.

Todo:
Should we cache failure too????
Author:
Matthew Palmer

Definition at line 24 of file SearchClassLoader.java.


Member Function Documentation

Class Sct.SearchClassLoader.findClassInClassPath String  name,
Class[]  prototype
[private]
 

Note:
This does not follow additional class paths in Manifest files

probably also doesn't work with extension directories.

Definition at line 125 of file SearchClassLoader.java.


The documentation for this class was generated from the following file:
Generated on Thu Jul 15 09:56:35 2004 for SCT DAQ/DCS Software - Java by doxygen 1.3.5