jade.util
Class ClassFinder

java.lang.Object
  extended by jade.util.ClassFinder

public class ClassFinder
extends java.lang.Object

This utility class was based originally on Daniel Le Berre's RTSI class. This class can be called in different modes, but the principal use is to determine what subclasses/implementations of a given class/interface exist in the current runtime environment.

Author:
Daniel Le Berre, Elliott Wade, Paolo Cancedda

Constructor Summary
ClassFinder()
           
 
Method Summary
 java.util.Vector findSubclasses(java.lang.String fqcn)
           
 java.util.Vector findSubclasses(java.lang.String fqcn, ClassFinderListener aListener, ClassFinderFilter aFilter)
           
 java.util.Map getClasspathLocations()
          Determine every URL location defined by the current classpath, and it's associated package name.
 java.util.List getErrors()
           
 java.net.URL getLocationOf(java.lang.Class cls)
          The result of the last search is cached in this object, along with the URL that corresponds to each class returned.
 boolean isWorking()
           
 void refreshLocations()
          Rescan the classpath, cacheing all possible file locations.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClassFinder

public ClassFinder()
Method Detail

isWorking

public boolean isWorking()

refreshLocations

public final void refreshLocations()
Rescan the classpath, cacheing all possible file locations.


findSubclasses

public final java.util.Vector findSubclasses(java.lang.String fqcn)

findSubclasses

public final java.util.Vector findSubclasses(java.lang.String fqcn,
                                             ClassFinderListener aListener,
                                             ClassFinderFilter aFilter)
Parameters:
fqcn - Name of superclass/interface on which to search

getErrors

public final java.util.List getErrors()

getLocationOf

public final java.net.URL getLocationOf(java.lang.Class cls)
The result of the last search is cached in this object, along with the URL that corresponds to each class returned. This method may be called to query the cache for the location at which the given class was found. null will be returned if the given class was not found during the last search, or if the result cache has been cleared.


getClasspathLocations

public final java.util.Map getClasspathLocations()
Determine every URL location defined by the current classpath, and it's associated package name.



These are the official JADE API. For these API backward compatibility is guaranteed accross JADE versions