Class AcceptReject.AcceptRejectPrefix
java.lang.Object
nonapi.io.github.classgraph.scanspec.AcceptReject
nonapi.io.github.classgraph.scanspec.AcceptReject.AcceptRejectPrefix
- Enclosing class:
AcceptReject
Accept/reject for prefix strings.
-
Nested Class Summary
Nested classes/interfaces inherited from class nonapi.io.github.classgraph.scanspec.AcceptReject
AcceptReject.AcceptRejectLeafname, AcceptReject.AcceptRejectPrefix, AcceptReject.AcceptRejectWholeString
-
Field Summary
Fields inherited from class nonapi.io.github.classgraph.scanspec.AcceptReject
accept, acceptGlobs, acceptPatterns, acceptPrefixes, acceptPrefixesSet, reject, rejectGlobs, rejectPatterns, rejectPrefixes, separatorChar
-
Constructor Summary
ConstructorsConstructorDescriptionDeserialization constructor.AcceptRejectPrefix
(char separatorChar) Instantiate a new accept/reject for prefix strings. -
Method Summary
Modifier and TypeMethodDescriptionboolean
acceptHasPrefix
(String str) Prefix-of-prefix is invalid -- throwsIllegalArgumentException
.void
addToAccept
(String str) Add to the accept.void
addToReject
(String str) Add to the reject.boolean
isAccepted
(String str) Check if the requested string has an accepted prefix.boolean
Check if the requested string has an accepted/non-rejected prefix.boolean
isRejected
(String str) Check if the requested string has a rejected prefix.Methods inherited from class nonapi.io.github.classgraph.scanspec.AcceptReject
acceptAndRejectAreEmpty, acceptIsEmpty, classNameToClassfilePath, globToPattern, isSpecificallyAccepted, isSpecificallyAcceptedAndNotRejected, normalizePackageOrClassName, normalizePath, packageNameToPath, pathToPackageName, rejectIsEmpty, sortPrefixes, toString
-
Constructor Details
-
AcceptRejectPrefix
public AcceptRejectPrefix()Deserialization constructor. -
AcceptRejectPrefix
public AcceptRejectPrefix(char separatorChar) Instantiate a new accept/reject for prefix strings.- Parameters:
separatorChar
- the separator char
-
-
Method Details
-
addToAccept
Add to the accept.- Specified by:
addToAccept
in classAcceptReject
- Parameters:
str
- the string to accept
-
addToReject
Add to the reject.- Specified by:
addToReject
in classAcceptReject
- Parameters:
str
- the string to reject
-
isAcceptedAndNotRejected
Check if the requested string has an accepted/non-rejected prefix.- Specified by:
isAcceptedAndNotRejected
in classAcceptReject
- Parameters:
str
- the string to test- Returns:
- true if string is accepted and not rejected
-
isAccepted
Check if the requested string has an accepted prefix.- Specified by:
isAccepted
in classAcceptReject
- Parameters:
str
- the string to test- Returns:
- true if string is accepted
-
acceptHasPrefix
Prefix-of-prefix is invalid -- throwsIllegalArgumentException
.- Specified by:
acceptHasPrefix
in classAcceptReject
- Parameters:
str
- the string to test- Returns:
- (does not return, throws exception)
- Throws:
IllegalArgumentException
- always
-
isRejected
Check if the requested string has a rejected prefix.- Specified by:
isRejected
in classAcceptReject
- Parameters:
str
- the string to test- Returns:
- true if the string has a rejected prefix
-