public class JarFileHelper
extends java.lang.Object
There are 2 ways to use JarFileHelper objects:
lc.jar: in this case
the jar file is retrieved by following ACS rules i.e. ../lib, INROOT/lib...
$INTROOT/lib/lc.jar
Given the name of a jar file, JarFile get the right jar file from the
file system looking the folder as ACS rules.
The content of thSe jar file is then examined to get the list of the java classes and packages
it contains as well as any other info needed.
Note: this class is intended to work only with ACS distributed jar files.
| Constructor and Description |
|---|
JarFileHelper(java.io.File file)
Constructor
|
JarFileHelper(java.lang.String name,
java.lang.String[] folders)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
getClasses(java.util.Collection<java.lang.String> javaClasses)
Flush the java classes contained in this jar file
into the passed vector.
|
java.lang.String |
getFilePathName() |
java.util.Collection<java.lang.String> |
getMatchingClasses(java.lang.String name)
Check if a class with the given name is in the jar.
|
java.lang.String |
getName() |
int |
getPackages(java.util.Collection<java.lang.String> javaPackages)
Flush the java packages contained in this jar file
into the passed vector.
|
public JarFileHelper(java.lang.String name,
java.lang.String[] folders)
throws java.lang.Exception
name - The name of the ACS jar file (like lc.jar)folders - The folders to look for the jar filesjava.lang.Exceptionpublic JarFileHelper(java.io.File file)
throws java.lang.Exception
file - The jar filejava.lang.Exceptionpublic int getPackages(java.util.Collection<java.lang.String> javaPackages)
throws java.io.IOException
java.io.IOException - In case of error reading the jar filepublic void getClasses(java.util.Collection<java.lang.String> javaClasses)
throws java.io.IOException
java.io.IOExceptionpublic java.util.Collection<java.lang.String> getMatchingClasses(java.lang.String name)
throws java.io.IOException
lc.jar then
the returned array contains LoggingClient and LoggingClientTextname - The beginning of the name of the classnull
if no class name in the jar matches with the parameterjava.io.IOException - In case of error reading the jar filepublic java.lang.String getFilePathName()
public java.lang.String getName()