Bugfix:
- Fixes
.getAllAnnotations()
and.getAnnotationInfo()
to return meta-annotations as well as annotations. (This got broken somewhere in the refactoring from FastClasspathScanner to ClassGraph.)
New method:
- Adds the new method
AnnotationInfoList#getDirect()
that returns the list of direct annotations, excluding meta-annotations. If theAnnotationInfoList
consists of class annotations, i.e. if it was produced byClassInfo#getAnnotationInfo()
, then the returned list also excludes annotations inherited from a superclass or implemented interface that were meta-annotated with@java.lang.annotation.Inherited
. Many thanks to @michael-simons for suggesting and implementing this feature!