Package net.sourceforge.pmd.util.filter
Class RegexStringFilter
- java.lang.Object
-
- net.sourceforge.pmd.util.filter.RegexStringFilter
-
- All Implemented Interfaces:
Filter<java.lang.String>
public class RegexStringFilter extends java.lang.Object implements Filter<java.lang.String>
A filter which uses a regular expression to match Strings. Invalid regular expressions will match nothing.Because regular expression matching is slow, and a common usage is to match some sort of relative file path, the regular expression is checked to see if it can be evaluated using much faster calls to
String.endsWith(String)
.
-
-
Constructor Summary
Constructors Constructor Description RegexStringFilter(java.lang.String regex)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
filter(java.lang.String obj)
java.lang.String
getEndsWith()
java.lang.String
getRegex()
protected void
optimize()
java.lang.String
toString()
-