|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--edu.iu.iv.common.util.JarScanner
A utility class that can dynamically load classes from a set of paths, which may be jar files or folders which contain jars. The classes can then be scanned to enumerate the subtypes of a given class.
| Constructor Summary | |
JarScanner()
Creates a JarScanner with no paths initially set. |
|
JarScanner(java.lang.String[] jarPaths)
Creates a JarScanner and uses it to scan the given paths. |
|
| Method Summary | |
java.util.List |
getInstantiableSubtypes(java.lang.Class supertype)
Returns a list of the classes loaded by this scanner that are instantiable subtypes of the given supertype. |
void |
setScanPaths(java.lang.String[] jarPaths)
Loads the classes from the jar files located at the given set of paths. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public JarScanner()
public JarScanner(java.lang.String[] jarPaths)
throws java.io.IOException
jarPaths - the paths to scan
java.io.IOException - if the scanner encounters an IO problem
while processing one of the given paths| Method Detail |
public void setScanPaths(java.lang.String[] jarPaths)
throws java.io.IOException
jarPaths - the paths to scan for jar files
java.io.IOException - if an IO problem is encountered while processing
one of the given pathspublic java.util.List getInstantiableSubtypes(java.lang.Class supertype)
supertype - the class whose subtypes are desired
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||