net.sourceforge.cobertura.util

Class RegexUtil


public abstract class RegexUtil
extends java.lang.Object

Abstract, not to be instantiated utility class for Regex functions.
Author:
John Lewis (logic copied from MethodInstrumenter)

Field Summary

private static Logger
logger
private static Perl5Matcher
pm

Method Summary

static void
addRegex(Collection list, String regex)
static boolean
matches(Collection regexs, String str)
Check to see if one of the regular expressions in a collection match an input string.

Field Details

logger

private static final Logger logger

pm

private static final Perl5Matcher pm

Method Details

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.