Class AnnotatedClassUtils

java.lang.Object
edu.cmu.tetrad.annotation.AnnotatedClassUtils

public class AnnotatedClassUtils extends Object
Sep 6, 2017 11:11:38 AM
Author:
Kevin V. Bui (kvb2@pitt.edu)
  • Method Details

    • getAnnotatedClasses

      public static <T extends Annotation> List<AnnotatedClass<T>> getAnnotatedClasses(String packageName, Class<T> type)
      Gets a list of annotated classes in the given package.
      Type Parameters:
      T - annotation type.
      Parameters:
      packageName - package name
      type - annotation type
      Returns:
      list of annotated classes
    • filterByAnnotations

      public static <T extends Annotation> List<AnnotatedClass<T>> filterByAnnotations(Class<? extends Annotation> annotation, List<AnnotatedClass<T>> annotatedClasses)
      Filters a list of annotated classes by the given annotation.
      Type Parameters:
      T - annotation type.
      Parameters:
      annotation - annotation
      annotatedClasses - list of annotated classes
      Returns:
      list of annotated classes