public ClassGraph blacklistClasses ( final String ... classNames ) { enableClassInfo ( ) ; for ( final String className : classNames ) { if ( className . contains ( "*" ) ) { throw new IllegalArgumentException ( "Cannot use a glob wildcard here: " + className ) ; } final String classNameNormalized = WhiteBlackList . normalizePackageOrClassName ( className ) ; scanSpec . classWhiteBlackList . addToBlacklist ( classNameNormalized ) ; scanSpec . classfilePathWhiteBlackList . addToBlacklist ( WhiteBlackList . classNameToClassfilePath ( classNameNormalized ) ) ; } return this ; }
Specifically blacklist one or more specific classes preventing them from being scanned even if they are in a whitelisted package .