public class JarScanner extends Object
| Constructor and Description |
|---|
JarScanner() |
| Modifier and Type | Method and Description |
|---|---|
static Set<Pckg> |
scan(File jarFile)
Builds the set of
Pckg to export from the given file (must be a jar file). |
static Set<Pckg> |
scan(JarFile jar,
String version)
Builds the set of
Pckg to export from the given jar file. |
static String |
version(String name)
Guesses the version of the jar file based on naming rules.
|
public static String version(String name)
name - the file namenull if it can't be guessed.public static Set<Pckg> scan(JarFile jar, String version)
Pckg to export from the given jar file.
Notice that "META-INF" directory and sub-directories are not exported.jar - the jar fileversion - the version of the jar file. This version is used as 'exported version' for each packages.public static Set<Pckg> scan(File jarFile) throws IOException
Pckg to export from the given file (must be a jar file).
If the given file's name does not end with .jar, null is returned.
This methods also try to guess the version of the jar file. If it can't be guesses, 0.0.0 is used.
jarFile - the file to scanIOException - if the file cannot be readCopyright © 2009–2014 OW2 Chameleon. All rights reserved.