eu.unicore.hila
Class PackageUtil

java.lang.Object
  extended by eu.unicore.hila.PackageUtil

public class PackageUtil
extends Object

This class is able to return all classes in a given package. It may not work for the default package, which you shouldn't use anyway.


Constructor Summary
PackageUtil()
           
 
Method Summary
static Set<Class<?>> getClasses(ClassLoader loader, String packageName, boolean includeSubPackages)
           
static Set<Class<?>> getClasses(String packageName)
           
static Set<Class<?>> getFromDirectory(ClassLoader loader, File directory, String packageName, boolean includeSubPackages)
           
static Set<Class<?>> getFromJARFile(ClassLoader loader, String jar, String packageName, boolean includeSubPackages)
           
static String stripFilenameExtension(String _className)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PackageUtil

public PackageUtil()
Method Detail

getClasses

public static Set<Class<?>> getClasses(String packageName)
                                throws Exception
Throws:
Exception

getClasses

public static Set<Class<?>> getClasses(ClassLoader loader,
                                       String packageName,
                                       boolean includeSubPackages)
                                throws Exception
Throws:
Exception

getFromDirectory

public static Set<Class<?>> getFromDirectory(ClassLoader loader,
                                             File directory,
                                             String packageName,
                                             boolean includeSubPackages)
                                      throws Exception
Throws:
Exception

getFromJARFile

public static Set<Class<?>> getFromJARFile(ClassLoader loader,
                                           String jar,
                                           String packageName,
                                           boolean includeSubPackages)
                                    throws Exception
Throws:
Exception

stripFilenameExtension

public static String stripFilenameExtension(String _className)


Copyright © 2010-2013 UNICORE. All Rights Reserved.