public void addAllowedPackage ( String packageName ) { if ( packageName . endsWith ( "." ) ) { packageName = packageName . substring ( 0 , packageName . length ( ) - 1 ) ; } String packageRegex = START + dotsToRegex ( packageName ) + SEP + JAVA_IDENTIFIER_PART + "+.class$" ; LOG . debug ( "Package regex: {}" , packageRegex ) ; patternList . add ( Pattern . compile ( packageRegex ) . matcher ( "" ) ) ; }
Add the name of a package to be matched by the screener . All class files that appear to be in the package should be matched .