net.sourceforge.cobertura.util

Class RegexUtil

public abstract class RegexUtil extends Object

Abstract, not to be instantiated utility class for Regex functions.

Author: John Lewis (logic copied from MethodInstrumenter)

Field Summary
static Loggerlogger
static Perl5Matcherpm
Method Summary
static voidaddRegex(Collection list, String regex)
static booleanmatches(Collection regexs, String str)

Check to see if one of the regular expressions in a collection match an input string.

Field Detail

logger

private static final Logger logger

pm

private static final Perl5Matcher pm

Method Detail

addRegex

public static void addRegex(Collection list, String regex)

matches

public static boolean matches(Collection regexs, String str)

Check to see if one of the regular expressions in a collection match an input string.

Parameters: regexs The collection of regular expressions. str The string to check for a match.

Returns: True if a match is found.