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.
  • 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

      public void addToAccept(String str)
      Add to the accept.
      Specified by:
      addToAccept in class AcceptReject
      Parameters:
      str - the string to accept
    • addToReject

      public void addToReject(String str)
      Add to the reject.
      Specified by:
      addToReject in class AcceptReject
      Parameters:
      str - the string to reject
    • isAcceptedAndNotRejected

      public boolean isAcceptedAndNotRejected(String str)
      Check if the requested string has an accepted/non-rejected prefix.
      Specified by:
      isAcceptedAndNotRejected in class AcceptReject
      Parameters:
      str - the string to test
      Returns:
      true if string is accepted and not rejected
    • isAccepted

      public boolean isAccepted(String str)
      Check if the requested string has an accepted prefix.
      Specified by:
      isAccepted in class AcceptReject
      Parameters:
      str - the string to test
      Returns:
      true if string is accepted
    • acceptHasPrefix

      public boolean acceptHasPrefix(String str)
      Prefix-of-prefix is invalid -- throws IllegalArgumentException.
      Specified by:
      acceptHasPrefix in class AcceptReject
      Parameters:
      str - the string to test
      Returns:
      (does not return, throws exception)
      Throws:
      IllegalArgumentException - always
    • isRejected

      public boolean isRejected(String str)
      Check if the requested string has a rejected prefix.
      Specified by:
      isRejected in class AcceptReject
      Parameters:
      str - the string to test
      Returns:
      true if the string has a rejected prefix