de.upb.swtpra05.group03.shuttle.util
Class ClassPath

java.lang.Object
  extended byde.upb.swtpra05.group03.shuttle.util.ClassPath

public class ClassPath
extends java.lang.Object

This class offers methods useful when dealing with classpaths. For now it only contains a method to get all resources from the classpath (and any jar files that may be contained within the classpath). This was taken from the java developers forum.

Version:
$Revision: 1.3 $

Constructor Summary
ClassPath()
          Constructor for the ClassPath object
 
Method Summary
private  java.util.ArrayList generateDirList(java.io.File classpath, java.io.File dir)
          Recursively lists all files in a given dir.
 java.lang.String[] listSystemResources()
          Returns a list of all files in the classpath, or files in jar files contained in the classpath.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClassPath

public ClassPath()
Constructor for the ClassPath object

Method Detail

generateDirList

private java.util.ArrayList generateDirList(java.io.File classpath,
                                            java.io.File dir)
Recursively lists all files in a given dir.

Parameters:
dir - The directory to search for files, including subdirs
classpath - Description of the Parameter
Returns:
List of files

listSystemResources

public java.lang.String[] listSystemResources()
                                       throws java.io.IOException
Returns a list of all files in the classpath, or files in jar files contained in the classpath.

Returns:
The names of all found resources
Throws:
java.io.IOException