adavid.reflect
Class PackageFinder

java.lang.Object
  |
  +--adavid.reflect.PackageFinder

public class PackageFinder
extends java.lang.Object

PackageFinder finds only the packages, does not record the classes, java is too weak for this, the virtual machine crashes if we make a Class for every class


Field Summary
static boolean windoze
          setup windoze related problems correction I do not use the test on os, but on the file separator because the os could be Windoze 95/98/NT and I do not care
 
Constructor Summary
PackageFinder()
           
 
Method Summary
static PackageResource[] getPackageResources()
          return the packages of a system, tests before if the packages were already computed and compute them if needed
static PackageResource[] getPackageResources(java.lang.String name)
           
static java.lang.String[] getPackages()
           
static java.lang.String[] getPrefixedPackages()
           
static java.lang.String[] getUniqueStrings(java.util.StringTokenizer tokenizer)
           
static void main(java.lang.String[] args)
          this is the main function to test the package independently
static void setLabels(java.awt.Label classlabel, java.awt.Label packlabel, java.awt.Label pathlabel)
          this is the method to set the labels to display information when reading information from the system.
static void updatePackageResources()
          this function updates the packages and the file .PackageFinder.info
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

windoze

public static final boolean windoze
setup windoze related problems correction I do not use the test on os, but on the file separator because the os could be Windoze 95/98/NT and I do not care
Constructor Detail

PackageFinder

public PackageFinder()
Method Detail

getPackageResources

public static PackageResource[] getPackageResources()
return the packages of a system, tests before if the packages were already computed and compute them if needed

getPackageResources

public static PackageResource[] getPackageResources(java.lang.String name)
Parameters:
name - the name of the package to match
Returns:
all the packages which matche a name

getPackages

public static java.lang.String[] getPackages()
Returns:
the list of all the package names, similar to getPackageResources

getPrefixedPackages

public static java.lang.String[] getPrefixedPackages()
Returns:
the list of all the prefixed package names (with .), similar to getPackages

updatePackageResources

public static void updatePackageResources()
this function updates the packages and the file .PackageFinder.info

setLabels

public static void setLabels(java.awt.Label classlabel,
                             java.awt.Label packlabel,
                             java.awt.Label pathlabel)
this is the method to set the labels to display information when reading information from the system.

getUniqueStrings

public static java.lang.String[] getUniqueStrings(java.util.StringTokenizer tokenizer)
Parameters:
tokenizer - the tokenizer to get string from
Returns:
an array of unique strings got from the tokenizer

main

public static void main(java.lang.String[] args)
this is the main function to test the package independently