|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectse.hirt.plugin.JarScanner
public class JarScanner
Class for scanning Jar's. Provides methods for scanning a Jar and applying a user defined callback on each entry.
Nested Class Summary | |
---|---|
static interface |
JarScanner.EntryApplier
Callback interface to be used with the scanner. |
Constructor Summary | |
---|---|
JarScanner()
|
Method Summary | |
---|---|
static java.util.Set<java.lang.Class> |
getClassesFromJar(java.lang.ClassLoader loader,
java.util.jar.JarFile file)
Attempts to load all the class files found in the specified jar, using the specified loader. |
static java.lang.String |
getClassNameFromEntry(java.util.jar.JarEntry entry)
Returns the class name from a JarEntry, or null if it isn't a class. |
static void |
scanJar(java.util.jar.JarFile file,
JarScanner.EntryApplier appl)
Sifts through a jar file, applying the entry applier on every entry discovered. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JarScanner()
Method Detail |
---|
public static void scanJar(java.util.jar.JarFile file, JarScanner.EntryApplier appl)
file
- the file to look through.appl
- the entry applier to apply on every entry.public static java.lang.String getClassNameFromEntry(java.util.jar.JarEntry entry)
entry
- the JarEntry to convert to a class name.
public static java.util.Set<java.lang.Class> getClassesFromJar(java.lang.ClassLoader loader, java.util.jar.JarFile file)
loader
- the loader to try to load the classes from.file
- the jar file to load the classes from.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |