Class PackageUtils


  • public class PackageUtils
    extends java.lang.Object
    Utility class that finds all the classes in a given package.

    Created on Feb 24, 2006

    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void addClassLoader​(java.lang.ClassLoader loader)
      Add a class loader to the searchable loaders.
      static java.lang.String[] findClassesInPackage​(java.lang.String packageName, java.util.List<java.lang.String> included, java.util.List<java.lang.String> excluded)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • addClassLoader

        public static void addClassLoader​(java.lang.ClassLoader loader)
        Add a class loader to the searchable loaders.
      • findClassesInPackage

        public static java.lang.String[] findClassesInPackage​(java.lang.String packageName,
                                                              java.util.List<java.lang.String> included,
                                                              java.util.List<java.lang.String> excluded)
                                                       throws java.io.IOException
        Parameters:
        packageName - - The package name
        included - - The inclusion list.
        excluded - - The exclusion list
        Returns:
        - The list of all the classes inside this package
        Throws:
        java.io.IOException - - if there is an exception.