Class ClassFinder

java.lang.Object
net.thucydides.core.reflection.ClassFinder

public class ClassFinder extends Object
Load classes from a given package.
  • Method Details

    • loadClasses

      public static ClassFinder loadClasses()
    • annotatedWith

      public ClassFinder annotatedWith(Class annotation)
    • fromPackage

      public List<Class<?>> fromPackage(String packageName)
      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
    • getClasses

      public static List<Class<?>> getClasses(String packageName)
      Scans all classes accessible from the context class loader which belong to the given package and subpackages. Adapted from http://snippets.dzone.com/posts/show/4831 and extended to support use of JAR files
      Parameters:
      packageName - The base package
      Returns:
      The classes
    • thatImplement

      public ClassFinder thatImplement(Class<?> parentInterface)
    • thatMatch

      public ClassFinder thatMatch(Predicate<Class> condition)