001 package org.codehaus.groovy.runtime; 002 003 import java.util.regex.Matcher; 004 005 /** 006 * Created by IntelliJ IDEA. 007 * User: sam 008 * Date: May 17, 2004 009 * Time: 9:04:28 PM 010 * To change this template use File | Settings | File Templates. 011 */ 012 public class RegexSupport { 013 014 private static ThreadLocal currentMatcher = new ThreadLocal(); 015 016 public static Matcher getLastMatcher() { 017 return (Matcher) currentMatcher.get(); 018 } 019 020 public static void setLastMatcher(Matcher matcher) { 021 currentMatcher.set(matcher); 022 } 023 }