Package org.codehaus.groovy.runtime
Class RegexSupport
java.lang.Object
org.codehaus.groovy.runtime.RegexSupport
Used to store the last regex match.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic MatcherReturns the matcher saved for the current thread.static voidsetLastMatcher(Matcher matcher) Savesmatcheras the last match on the current thread.
-
Constructor Details
-
RegexSupport
public RegexSupport()
-
-
Method Details
-
getLastMatcher
Returns the matcher saved for the current thread.- Returns:
- that matcher, or null when this thread has not saved one
-
setLastMatcher
Savesmatcheras the last match on the current thread. Another thread keeps its own matcher. Passing null makesgetLastMatcher()return null.- Parameters:
matcher- matcher to store, or null to clear this thread's match
-