Package edu.cmu.tetrad.annotation
Class AnnotatedClassUtils
java.lang.Object
edu.cmu.tetrad.annotation.AnnotatedClassUtils
Sep 6, 2017 11:11:38 AM
- Version:
- $Id: $Id
- Author:
- Kevin V. Bui (kvb2@pitt.edu)
-
Method Summary
Modifier and TypeMethodDescriptionstatic <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.static <T extends Annotation>
List<AnnotatedClass<T>> getAnnotatedClasses
(String packageName, Class<T> type) Gets a list of annotated classes in the given package.
-
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 nametype
- 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
- annotationannotatedClasses
- list of annotated classes- Returns:
- list of annotated classes
-