View Javadoc

1   package org.codehaus.groovy.runtime;
2   
3   import java.util.regex.Matcher;
4   
5   /***
6    * Created by IntelliJ IDEA.
7    * User: sam
8    * Date: May 17, 2004
9    * Time: 9:04:28 PM
10   * To change this template use File | Settings | File Templates.
11   */
12  public class RegexSupport {
13  
14      private static ThreadLocal currentMatcher = new ThreadLocal();
15  
16      public static Matcher getLastMatcher() {
17          return (Matcher) currentMatcher.get();
18      }
19  
20      public static void setLastMatcher(Matcher matcher) {
21          currentMatcher.set(matcher);
22      }
23  }