| java.lang.Object net.sourceforge.pmd.rules.regex.RegexHelper
RegexHelper | public class RegexHelper (Code) | | A simple helper class to regroup a bunch of method
generally used by rules using regex.
author: Romain PELISSE, belaran@gmail.com |
Method Summary | |
public static List<Pattern> | compilePatternsFromList(List<String> list) Compiles a list of regex into a list of patterns. | public static boolean | isMatch(Pattern pattern, String subject) Simple commodity method (also designed to increase readability of source code,
and to decrease import in the calling class). |
compilePatternsFromList | public static List<Pattern> compilePatternsFromList(List<String> list)(Code) | | Compiles a list of regex into a list of patterns.
Parameters: list - the regex list the pattern list |
isMatch | public static boolean isMatch(Pattern pattern, String subject)(Code) | | Simple commodity method (also designed to increase readability of source code,
and to decrease import in the calling class).
Provide a pattern and a subject, it'll do the proper matching.
Parameters: pattern - a compiled regex pattern Parameters: subject - a String to match true if there is a match; false otherwise |
|
|