Class RegexMatchers
java.lang.Object
com.google.errorprone.matchers.RegexMatchers
Matchers and class name constants for regular expression APIs.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.google.common.collect.ImmutableSet<ClassName> All supported regular expressionMatcherclasses.static final com.google.common.collect.ImmutableSet<ClassName> All supported regular expressionPatternclasses.static final ClassNamestatic final ClassNamestatic final com.google.common.collect.ImmutableSet<ClassName> ImmutablePatternclasses that do not hold closeable native resources.static final Matcher<ExpressionTree> Matches staticcompile(andcompileUnsafe) calls onPatterntypes.static final Matcher<ExpressionTree> Matches instancematchercalls onPatterntypes.static final Matcher<ExpressionTree> Matches staticmatches(andmatchesUnsafe) calls onPatterntypes.static final Matcher<ExpressionTree> Matches staticquotecalls onPatterntypes.static final Matcher<ExpressionTree> Matchescom.google.common.base.Predicates.containsPattern(String).static final ClassNamestatic final ClassNamestatic final ClassNamestatic final ClassNamestatic final ClassNamestatic final Matcher<ExpressionTree> Matchescom.google.common.base.Splitter.onPattern(String).static final Matcher<ExpressionTree> MatchesString.matches(String).static final Matcher<ExpressionTree> static final Matcher<ExpressionTree> MatchesString.split(String)andString.split(String, int).static final Matcher<ExpressionTree> MatchesString.splitandString.splitWithDelimiters.static final Matcher<ExpressionTree> -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanisStringSplitFastPath(String regex) Returns true ifregextakes the non-regex fast path inString.split(String, int)andString.splitWithDelimiters(String, int)without compiling aPattern.
-
Field Details
-
JDK_PATTERN_CLASS
-
JDK_MATCHER_CLASS
-
RE2J_PATTERN_CLASS
-
RE2J_MATCHER_CLASS
-
SAFERE_PATTERN_CLASS
-
SAFERE_MATCHER_CLASS
-
SAFERE_CROSSCHECK_MATCHER_CLASS
-
NON_CLOSEABLE_PATTERN_CLASSES
ImmutablePatternclasses that do not hold closeable native resources. -
ALL_PATTERN_CLASSES
All supported regular expressionPatternclasses. -
ALL_MATCHER_CLASSES
All supported regular expressionMatcherclasses. -
PATTERN_COMPILE_METHODS
Matches staticcompile(andcompileUnsafe) calls onPatterntypes. -
PATTERN_MATCHES_METHODS
Matches staticmatches(andmatchesUnsafe) calls onPatterntypes. -
PATTERN_QUOTE_METHODS
Matches staticquotecalls onPatterntypes. -
PATTERN_MATCHER_METHODS
Matches instancematchercalls onPatterntypes. -
STRING_MATCHES_METHOD
MatchesString.matches(String). -
STRING_REPLACE_METHODS
-
STRING_SPLIT_METHOD
MatchesString.split(String)andString.split(String, int). -
STRING_SPLIT_WITH_DELIMITERS_METHOD
-
STRING_SPLIT_METHODS
MatchesString.splitandString.splitWithDelimiters. -
SPLITTER_ON_PATTERN_METHOD
Matchescom.google.common.base.Splitter.onPattern(String). -
PREDICATES_CONTAINS_PATTERN_METHOD
Matchescom.google.common.base.Predicates.containsPattern(String).
-
-
Method Details
-
isStringSplitFastPath
Returns true ifregextakes the non-regex fast path inString.split(String, int)andString.splitWithDelimiters(String, int)without compiling aPattern.
-