de.danielnaber.languagetool.tools
Class ReflectionUtils

Object
  extended by ReflectionUtils

public class ReflectionUtils
extends Object


Constructor Summary
ReflectionUtils()
           
 
Method Summary
static Class[] findClasses(ClassLoader classLoader, String packageName, String classNameRegEx, int subdirLevel, Class classExtends, Class interfaceImplements)
           
 
Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReflectionUtils

public ReflectionUtils()
Method Detail

findClasses

public static Class[] findClasses(ClassLoader classLoader,
                                  String packageName,
                                  String classNameRegEx,
                                  int subdirLevel,
                                  Class classExtends,
                                  Class interfaceImplements)
                           throws ClassNotFoundException
Parameters:
classLoader - Classloader to use for loading classes
packageName - Package name to check classes in
classNameRegEx - If not null limit class names to this regexp. This parameter is checked before class is loaded so use it to improve performance by skipping loading extra classes
subdirLevel - If more than 0 all subdirectories/subpackages up to dirLevel will be traversed This parameter is checked before class is loaded - use it to improve performance by skipping loading extra classes
classExtends - If not null return only classes which extend this class
interfaceImplements - If not null return only classes which implement this interface
Returns:
Returns all classes inside given package
Throws:
ClassNotFoundException


Copyright © 2005-2007 Daniel Naber