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 AcceptReject
AcceptReject.AcceptRejectLeafname, AcceptReject.AcceptRejectPrefix, AcceptReject.AcceptRejectWholeString -
Field Summary
Fields inherited from class 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 TypeMethodDescriptionbooleanacceptHasPrefix(String str) Prefix-of-prefix is invalid -- throwsIllegalArgumentException.voidaddToAccept(String str) Add to the accept.voidaddToReject(String str) Add to the reject.booleanisAccepted(String str) Check if the requested string has an accepted prefix.booleanCheck if the requested string has an accepted/non-rejected prefix.booleanisRejected(String str) Check if the requested string has a rejected prefix.Methods inherited from class 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:
addToAcceptin classAcceptReject- Parameters:
str- the string to accept
-
addToReject
Add to the reject.- Specified by:
addToRejectin classAcceptReject- Parameters:
str- the string to reject
-
isAcceptedAndNotRejected
Check if the requested string has an accepted/non-rejected prefix.- Specified by:
isAcceptedAndNotRejectedin 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:
isAcceptedin classAcceptReject- Parameters:
str- the string to test- Returns:
- true if string is accepted
-
acceptHasPrefix
Prefix-of-prefix is invalid -- throwsIllegalArgumentException.- Specified by:
acceptHasPrefixin 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:
isRejectedin classAcceptReject- Parameters:
str- the string to test- Returns:
- true if the string has a rejected prefix
-