public class ClassFinder
extends java.lang.Object
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.Constructor and Description |
---|
ClassFinder() |
ClassFinder(java.lang.String[] jarNames) |
Modifier and Type | Method and Description |
---|---|
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.
|
public ClassFinder()
public ClassFinder(java.lang.String[] jarNames)
public boolean isWorking()
public final void refreshLocations()
public final java.util.Vector findSubclasses(java.lang.String fqcn)
public final java.util.Vector findSubclasses(java.lang.String fqcn, ClassFinderListener aListener, ClassFinderFilter aFilter)
fqcn
- Name of superclass/interface on which to searchpublic final java.util.List getErrors()
public final java.net.URL getLocationOf(java.lang.Class cls)
null
will be returned if the given class was not found
during the last search, or if the result cache has been cleared.public final java.util.Map getClasspathLocations()