01: /*
02: * Copyright 2005 Paul Hinds
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
10: * Unless required by applicable law or agreed to in writing, software
11: * distributed under the License is distributed on an "AS IS" BASIS,
12: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13: * See the License for the specific language governing permissions and
14: * limitations under the License.
15: */
16: package org.tp23.antinstaller.antmod;
17:
18: import org.apache.tools.ant.BuildException;
19: import org.apache.tools.ant.util.regexp.RegexpMatcher;
20:
21: /**
22: * This class exists because the default Regexp handler is not part of ant.jar
23: * @author Paul Hinds
24: * @version $Id: RegexpMatcherFactory.java,v 1.2 2006/12/21 00:03:05 teknopaul Exp $
25: */
26: public class RegexpMatcherFactory {
27:
28: /**
29: *
30: */
31: public RegexpMatcherFactory() {
32: super ();
33: }
34:
35: public RegexpMatcher newRegexpMatcher() throws BuildException {
36: try {
37: return new org.apache.tools.ant.util.regexp.RegexpMatcherFactory()
38: .newRegexpMatcher(null);
39: } catch (BuildException be) {
40: return new Jdk14RegexpMatcher();
41: }
42: }
43: }
|