public final class RegexProfile extends Object
TRegexExecNode,
TRegexLazyCaptureGroupsRootNode| Modifier and Type | Class and Description |
|---|---|
static interface |
RegexProfile.TracksRegexProfile |
| Constructor and Description |
|---|
RegexProfile() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
atEvaluationTripPoint()
Check if the profiling information gathered so far is sufficient for making a decision.
|
void |
incCalls()
Increase the number of times the regular expression was executed by one.
|
void |
incMatches()
Increase the number of times a match for the regular expression was found by one.
|
void |
incProcessedCharacters(int numberOfCharacters) |
void |
profileCaptureGroupAccess(int matchLength,
int numberOfCharsTraversed)
Update profile after the execution of a lazy capture groups search DFA.
|
void |
resetCalls() |
boolean |
shouldGenerateDFA(int inputLength)
Decides whether the regular expression was executed often enough or would process enough
characters to warrant the costly generation of a fully expanded DFA.
|
boolean |
shouldUseEagerMatching()
Decides whether the capture groups of the regular expression should be matched in an eager
manner.
|
String |
toString() |
public void incCalls()
public void resetCalls()
public void incMatches()
public void profileCaptureGroupAccess(int matchLength,
int numberOfCharsTraversed)
matchLength - the length of capture group 0 of the match.numberOfCharsTraversed - the number of characters that were traversed between the
initial index (fromIndex) and the end of the match.TRegexLazyCaptureGroupsRootNodepublic boolean atEvaluationTripPoint()
true if the number of times the regular expression was called is divisible by
.public boolean shouldGenerateDFA(int inputLength)
public void incProcessedCharacters(int numberOfCharacters)
public boolean shouldUseEagerMatching()
true if: