Package io.github.classgraph.utils
Class WhiteBlackList.WhiteBlackListPrefix
- java.lang.Object
-
- io.github.classgraph.utils.WhiteBlackList
-
- io.github.classgraph.utils.WhiteBlackList.WhiteBlackListPrefix
-
- Enclosing class:
- WhiteBlackList
public static class WhiteBlackList.WhiteBlackListPrefix extends WhiteBlackList
Whitelist/blacklist for prefix strings.
-
-
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 WhiteBlackListPrefix()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addToBlacklist(String str)
Add to the blacklist.void
addToWhitelist(String str)
Add to the whitelist.boolean
isBlacklisted(String str)
Check if the requested string has a blacklisted prefix.boolean
isWhitelisted(String str)
Check if the requested string has a whitelisted prefix.boolean
isWhitelistedAndNotBlacklisted(String str)
Check if the requested string has a whitelisted/non-blacklisted prefix.boolean
whitelistHasPrefix(String str)
Prefix-of-prefix is invalid.-
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:
addToWhitelist
in classWhiteBlackList
- Parameters:
str
- The string to whitelist.
-
addToBlacklist
public void addToBlacklist(String str)
Add to the blacklist.- Specified by:
addToBlacklist
in classWhiteBlackList
- Parameters:
str
- The string to blacklist.
-
isWhitelistedAndNotBlacklisted
public boolean isWhitelistedAndNotBlacklisted(String str)
Check if the requested string has a whitelisted/non-blacklisted prefix.- Specified by:
isWhitelistedAndNotBlacklisted
in 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 has a whitelisted prefix.- Specified by:
isWhitelisted
in classWhiteBlackList
- Parameters:
str
- The string to test.- Returns:
- true if the string is whitelisted.
-
whitelistHasPrefix
public boolean whitelistHasPrefix(String str)
Prefix-of-prefix is invalid.- Specified by:
whitelistHasPrefix
in 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 has a blacklisted prefix.- Specified by:
isBlacklisted
in classWhiteBlackList
- Parameters:
str
- The string to test.- Returns:
- true if the string is blacklisted.
-
-