Package com.google.errorprone.util
Class Regexes
java.lang.Object
com.google.errorprone.util.Regexes
Utilities for checks that work with regexes.
-
Method Summary
Modifier and TypeMethodDescriptionIf the given regexes matches exactly one string, returns that string.
-
Method Details
-
convertRegexToLiteral
If the given regexes matches exactly one string, returns that string. Otherwise returnsnull
. This can be used to identify arguments to e.g.String.replaceAll
that don't need to be regexes.
-