private boolean isMatchingPackage(String s) {
    int slashIndex = s.lastIndexOf('/');

    String packageName;
    if (slashIndex == -1) {
      packageName = "";
    } else {
      packageName = s.substring(0, slashIndex);
    }

    return matchPackages.contains(packageName);
  }
Checks to see if a specified package should be considered a match due to previous matches.

@param s {@code non-null;} package name
@return true if this package should be considered a match
android/android_framework/dex-maker/src/main/java/com/android/dx/command/annotool/AnnotationLister.java