net.contextfw.web.application.internal.util
Class PackageUtils

java.lang.Object
  extended by net.contextfw.web.application.internal.util.PackageUtils

public class PackageUtils
extends Object


Constructor Summary
PackageUtils()
           
 
Method Summary
static List<Class<?>> getClasses(String packageName, ClassLoader classLoader)
          Scans all classes accessible from the context class loader which belong to the given package and subpackages.
static List<File> getResources(String packageName, ClassLoader classLoader)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PackageUtils

public PackageUtils()
Method Detail

getResources

public static List<File> getResources(String packageName,
                                      ClassLoader classLoader)
                               throws IOException
Throws:
IOException

getClasses

public static List<Class<?>> getClasses(String packageName,
                                        ClassLoader classLoader)
                                 throws ClassNotFoundException,
                                        IOException
Scans all classes accessible from the context class loader which belong to the given package and subpackages.

Parameters:
packageName - The base package
Returns:
The classes
Throws:
ClassNotFoundException
IOException


Copyright © 2010. All Rights Reserved.