Class AcceptReject.AcceptRejectPrefix
- java.lang.Object
-
- nonapi.io.github.classgraph.scanspec.AcceptReject
-
- nonapi.io.github.classgraph.scanspec.AcceptReject.AcceptRejectPrefix
-
- Enclosing class:
- AcceptReject
public static class AcceptReject.AcceptRejectPrefix extends 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
Constructors Constructor Description AcceptRejectPrefix()Deserialization constructor.AcceptRejectPrefix(char separatorChar)Instantiate a new accept/reject for prefix strings.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanacceptHasPrefix(java.lang.String str)Prefix-of-prefix is invalid -- throwsIllegalArgumentException.voidaddToAccept(java.lang.String str)Add to the accept.voidaddToReject(java.lang.String str)Add to the reject.booleanisAccepted(java.lang.String str)Check if the requested string has an accepted prefix.booleanisAcceptedAndNotRejected(java.lang.String str)Check if the requested string has an accepted/non-rejected prefix.booleanisRejected(java.lang.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
-
-
-
-
Method Detail
-
addToAccept
public void addToAccept(java.lang.String str)
Add to the accept.- Specified by:
addToAcceptin classAcceptReject- Parameters:
str- the string to accept
-
addToReject
public void addToReject(java.lang.String str)
Add to the reject.- Specified by:
addToRejectin classAcceptReject- Parameters:
str- the string to reject
-
isAcceptedAndNotRejected
public boolean isAcceptedAndNotRejected(java.lang.String str)
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
public boolean isAccepted(java.lang.String str)
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
public boolean acceptHasPrefix(java.lang.String str)
Prefix-of-prefix is invalid -- throwsIllegalArgumentException.- Specified by:
acceptHasPrefixin classAcceptReject- Parameters:
str- the string to test- Returns:
- (does not return, throws exception)
- Throws:
java.lang.IllegalArgumentException- always
-
isRejected
public boolean isRejected(java.lang.String str)
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
-
-