private String buildIncludeRegExp ( String [ ] scanPaths ) { String includeRegExp = "" ; for ( String path : scanPaths ) { includeRegExp += path . trim ( ) . replace ( "/" , "\\." ) + ".*|" ; } if ( scanPaths . length > 0 ) { // Remove last | includeRegExp = includeRegExp . substring ( 0 , includeRegExp . length ( ) - 1 ) ; } return includeRegExp ; }
Returns a regular expression of acceptable package names .