code: private static String tryGetForbiddenPackageName(String classAndMethod) {
  
          for (String pkg : suppressedPackages) {
              if (classAndMethod.startsWith(pkg)) {
                  return pkg;
              }
          }
          return null;
      }
docs: Checks to see if the class is part of a forbidden package. If so, it returns the package name from the list of suppressed
  packages that matches, otherwise it returns null.
  
  @param classAndMethod StackTraceElement
  @return forbidden package name or null.