org.apertereports.common.utils
Class ClassUtils

java.lang.Object
  extended by org.apertereports.common.utils.ClassUtils

public class ClassUtils
extends Object

Utility methods for extracting classes from a package.


Constructor Summary
ClassUtils()
           
 
Method Summary
static Class<?>[] getClassesFromPackage(String pack)
          The main workhorse of this class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClassUtils

public ClassUtils()
Method Detail

getClassesFromPackage

public static Class<?>[] getClassesFromPackage(String pack)
                                        throws ClassNotFoundException
The main workhorse of this class. Extracts all classes from a given package. Uses current thread's class loader to retrieve the reference to the package.

Parameters:
pack - Package signature
Returns:
List of classes from the given package
Throws:
ClassNotFoundException - When the package is invalid


Copyright © 2011-2012. All Rights Reserved.