Class RegexHelper
- java.lang.Object
-
- net.sourceforge.pmd.lang.java.rule.regex.RegexHelper
-
@Deprecated @InternalApi public final class RegexHelper extends Object
Deprecated.Internal APIA simple helper class to regroup a bunch of method generally used by rules using regex.- Author:
- Romain PELISSE, belaran@gmail.com
-
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static List<Pattern>
compilePatternsFromList(List<String> list)
Deprecated.Compiles a list of regex into a list of patterns.static boolean
isMatch(Pattern pattern, String subject)
Deprecated.Simple commodity method (also designed to increase readability of source code, and to decrease import in the calling class).
-
-
-
Method Detail
-
compilePatternsFromList
public static List<Pattern> compilePatternsFromList(List<String> list)
Deprecated.Compiles a list of regex into a list of patterns.- Parameters:
list
- the regex list- Returns:
- the pattern list
-
isMatch
public static boolean isMatch(Pattern pattern, String subject)
Deprecated.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 patternsubject
- a String to match- Returns:
true
if there is a match;false
otherwise
-
-