Package io.github.classgraph.utils
Class WhiteBlackList.WhiteBlackListWholeString
- java.lang.Object
-
- io.github.classgraph.utils.WhiteBlackList
-
- io.github.classgraph.utils.WhiteBlackList.WhiteBlackListWholeString
-
- Direct Known Subclasses:
WhiteBlackList.WhiteBlackListLeafname
- Enclosing class:
- WhiteBlackList
public static class WhiteBlackList.WhiteBlackListWholeString extends WhiteBlackList
Whitelist/blacklist for whole-strings matches.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class io.github.classgraph.utils.WhiteBlackList
WhiteBlackList.WhiteBlackListLeafname, WhiteBlackList.WhiteBlackListPrefix, WhiteBlackList.WhiteBlackListWholeString
-
-
Field Summary
-
Fields inherited from class io.github.classgraph.utils.WhiteBlackList
blacklist, blacklistGlobs, blacklistPatterns, blacklistPrefixes, whitelist, whitelistGlobs, whitelistPatterns, whitelistPrefixes
-
-
Constructor Summary
Constructors Constructor Description WhiteBlackListWholeString()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddToBlacklist(String str)Add to the blacklist.voidaddToWhitelist(String str)Add to the whitelist.booleanisBlacklisted(String str)Check if the requested string is blacklisted.booleanisWhitelisted(String str)Check if the requested string is whitelisted.booleanisWhitelistedAndNotBlacklisted(String str)Check if the requested string is whitelisted and not blacklisted.booleanwhitelistHasPrefix(String str)Check if the requested string is a prefix of a whitelisted string.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from class io.github.classgraph.utils.WhiteBlackList
classNameToClassfilePath, globToPattern, isSpecificallyWhitelisted, isSpecificallyWhitelistedAndNotBlacklisted, normalizePackageOrClassName, normalizePath, packageNameToPath, pathToPackageName, sortPrefixes, toString, whitelistIsEmpty
-
-
-
-
Method Detail
-
addToWhitelist
public void addToWhitelist(String str)
Add to the whitelist.- Specified by:
addToWhitelistin classWhiteBlackList- Parameters:
str- The string to whitelist.
-
addToBlacklist
public void addToBlacklist(String str)
Add to the blacklist.- Specified by:
addToBlacklistin classWhiteBlackList- Parameters:
str- The string to blacklist.
-
isWhitelistedAndNotBlacklisted
public boolean isWhitelistedAndNotBlacklisted(String str)
Check if the requested string is whitelisted and not blacklisted.- Specified by:
isWhitelistedAndNotBlacklistedin classWhiteBlackList- Parameters:
str- The string to test.- Returns:
- true if the string is whitelisted and not blacklisted.
-
isWhitelisted
public boolean isWhitelisted(String str)
Check if the requested string is whitelisted.- Specified by:
isWhitelistedin classWhiteBlackList- Parameters:
str- The string to test.- Returns:
- true if the string is whitelisted.
-
whitelistHasPrefix
public boolean whitelistHasPrefix(String str)
Check if the requested string is a prefix of a whitelisted string.- Specified by:
whitelistHasPrefixin classWhiteBlackList- Parameters:
str- The string to test.- Returns:
- true if the string is a prefix of a whitelisted string.
-
isBlacklisted
public boolean isBlacklisted(String str)
Check if the requested string is blacklisted.- Specified by:
isBlacklistedin classWhiteBlackList- Parameters:
str- The string to test.- Returns:
- true if the string is blacklisted.
-
-