1 | /*
|
---|
2 | * Copyright 2005 Paul Hinds
|
---|
3 | *
|
---|
4 | * Licensed under the Apache License, Version 2.0 (the "License");
|
---|
5 | * you may not use this file except in compliance with the License.
|
---|
6 | * You may obtain a copy of the License at
|
---|
7 | *
|
---|
8 | * http://www.apache.org/licenses/LICENSE-2.0
|
---|
9 | *
|
---|
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 | /**
|
---|
23 | * This class exists because the default Regexp handler is not part of ant.jar
|
---|
24 | * @author Paul Hinds
|
---|
25 | * @version $Id: RegexpMatcherFactory.java,v 1.2 2006/12/21 00:03:05 teknopaul Exp $
|
---|
26 | */
|
---|
27 | public class RegexpMatcherFactory {
|
---|
28 |
|
---|
29 | /**
|
---|
30 | *
|
---|
31 | */
|
---|
32 | public RegexpMatcherFactory() {
|
---|
33 | super();
|
---|
34 | }
|
---|
35 | public RegexpMatcher newRegexpMatcher() throws BuildException {
|
---|
36 | try{
|
---|
37 | return new org.apache.tools.ant.util.regexp.RegexpMatcherFactory().newRegexpMatcher(null);
|
---|
38 | }
|
---|
39 | catch(BuildException be){
|
---|
40 | return new Jdk14RegexpMatcher();
|
---|
41 | }
|
---|
42 | }
|
---|
43 | }
|
---|