|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.pmd.lang.java.rule.regex.RegexHelper
public final class RegexHelper
A simple helper class to regroup a bunch of method generally used by rules using regex.
Method Summary | |
---|---|
static List<Pattern> |
compilePatternsFromList(List<String> list)
Compiles a list of regex into a list of patterns. |
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). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static List<Pattern> compilePatternsFromList(List<String> list)
list
- the regex list
public static boolean isMatch(Pattern pattern, String subject)
pattern
- a compiled regex patternsubject
- a String to match
true
if there is a match; false
otherwise
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |