Class AcceptReject.AcceptRejectLeafname
java.lang.Object
nonapi.io.github.classgraph.scanspec.AcceptReject
nonapi.io.github.classgraph.scanspec.AcceptReject.AcceptRejectWholeString
nonapi.io.github.classgraph.scanspec.AcceptReject.AcceptRejectLeafname
- Enclosing class:
AcceptReject
Accept/reject for leaf matches.
-
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.AcceptRejectLeafname
(char separatorChar) Instantiates a new accept/reject for leaf matches. -
Method Summary
Modifier and TypeMethodDescriptionboolean
acceptHasPrefix
(String str) Prefix tests are invalid for jar leafnames -- 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 is accepted.boolean
Check if the requested string is accepted and not rejected.boolean
isRejected
(String str) Check if the requested string is rejected.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
-
AcceptRejectLeafname
public AcceptRejectLeafname()Deserialization constructor. -
AcceptRejectLeafname
public AcceptRejectLeafname(char separatorChar) Instantiates a new accept/reject for leaf matches.- Parameters:
separatorChar
- the separator char
-
-
Method Details
-
addToAccept
Add to the accept.- Overrides:
addToAccept
in classAcceptReject.AcceptRejectWholeString
- Parameters:
str
- the string to accept
-
addToReject
Add to the reject.- Overrides:
addToReject
in classAcceptReject.AcceptRejectWholeString
- Parameters:
str
- the string to reject
-
isAcceptedAndNotRejected
Check if the requested string is accepted and not rejected.- Overrides:
isAcceptedAndNotRejected
in classAcceptReject.AcceptRejectWholeString
- Parameters:
str
- the string to test- Returns:
- true if the string is accepted and not rejected
-
isAccepted
Check if the requested string is accepted.- Overrides:
isAccepted
in classAcceptReject.AcceptRejectWholeString
- Parameters:
str
- the string to test- Returns:
- true if the string is accepted
-
acceptHasPrefix
Prefix tests are invalid for jar leafnames -- throwsIllegalArgumentException
.- Overrides:
acceptHasPrefix
in classAcceptReject.AcceptRejectWholeString
- Parameters:
str
- the string to test- Returns:
- (does not return, throws exception)
- Throws:
IllegalArgumentException
- always
-
isRejected
Check if the requested string is rejected.- Overrides:
isRejected
in classAcceptReject.AcceptRejectWholeString
- Parameters:
str
- the string to test- Returns:
- true if the string is rejected
-