question: public static Pattern createPattern ( String [ ] patterns , boolean isCaseSensitive , boolean isRegexSearch ) throws PatternSyntaxException { StringBuffer pattern = new StringBuffer ( ) ; for ( int i = 0 ; i < patterns . length ; i ++ ) { if ( i > 0 ) { pattern . append ( '|' ) ; } if ( isRegexSearch ) { pattern . append ( patterns [ i ] ) ; } else { asRegEx ( patterns [ i ] , pattern ) ; } } return createPattern ( pattern . toString ( ) , isCaseSensitive , true ) ; }
target:  Creates a pattern element from the pattern string which is either a reg-ex expression or in our old 'StringMatcher' format.