public ClassInfoList getClassesWithAnnotation ( final String annotationName ) { if ( closed . get ( ) ) { throw new IllegalArgumentException ( "Cannot use a ScanResult after it has been closed" ) ; } if ( ! scanSpec . enableClassInfo || ! scanSpec . enableAnnotationInfo ) { throw new IllegalArgumentException ( "Please call ClassGraph#enableClassInfo() and #enableAnnotationInfo() before #scan()" ) ; } final ClassInfo classInfo = classNameToClassInfo . get ( annotationName ) ; return classInfo == null ? ClassInfoList . EMPTY_LIST : classInfo . getClassesWithAnnotation ( ) ; }
Get classes with the named class annotation or meta - annotation .