public class JarFolder
extends java.lang.Object
JarFolder holds a folder of jar files allowing to perform the
most common operation.| Modifier and Type | Class and Description |
|---|---|
class |
JarFolder.JarClasses
A data structure representing the classes of a jar file.
|
class |
JarFolder.JarFileNameFilter
A filter to get on the jar files in the folder
|
| Constructor and Description |
|---|
JarFolder(java.io.File folder) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
containsJar(java.lang.String jarname)
Check if the folder contains a given jar file.
|
java.lang.String |
getAbsolutePath()
Return the absolute path of this folder of jars.
|
java.io.File |
getJar(java.lang.String name)
Get the
File of the jar with the given name. |
java.io.File[] |
getJarFiles() |
java.lang.String[] |
getJars()
Return the list of jar names in folder.
|
java.util.Collection<JarFolder.JarClasses> |
getJarsContainingClass(java.lang.String javaClass)
Return a list of jar files containing a given class.
|
public java.io.File[] getJarFiles()
public java.lang.String[] getJars()
lc.jar.public java.io.File getJar(java.lang.String name)
File of the jar with the given name.name - The name of the jar like for example lc.jarnull if the jar does not exist
in the folderpublic boolean containsJar(java.lang.String jarname)
jarname - A jar file like lc.jartrue if the folder contains the passed jarpublic java.util.Collection<JarFolder.JarClasses> getJarsContainingClass(java.lang.String javaClass) throws java.lang.Exception
The class name can be the whole name of a class or the beginning of its name.
For example if javaClass is LoggingClient, this class
returns both LoggingClient and LoggingClientText from
lc.jar.
javaClassName - The name of a class or a the beginning of its namenull
if no classes in the jars match with the passed partial namejava.lang.Exceptionpublic java.lang.String getAbsolutePath()