private static String tryGetForbiddenPackageName ( String classAndMethod ) { for ( String pkg : suppressedPackages ) { if ( classAndMethod . startsWith ( pkg ) ) { return pkg ; } } return null ; }
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 .