Browse Source

magic name

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@306781 13f79535-47bb-0310-9956-ffa450edef68
master
Matthew Jason Benson 20 years ago
parent
commit
3f1d4561b6
2 changed files with 10 additions and 4 deletions
  1. +5
    -0
      src/main/org/apache/tools/ant/MagicNames.java
  2. +5
    -4
      src/main/org/apache/tools/ant/util/regexp/RegexpMatcherFactory.java

+ 5
- 0
src/main/org/apache/tools/ant/MagicNames.java View File

@@ -103,6 +103,11 @@ public final class MagicNames {
* Value: {@value} * Value: {@value}
*/ */
public static final String ANT_FILE = "ant.file"; public static final String ANT_FILE = "ant.file";
/**
* property for regular expression implementation.
* Value: {@value}
*/
public static final String REGEXP_IMPL = "ant.regexp.regexpimpl";


} }



+ 5
- 4
src/main/org/apache/tools/ant/util/regexp/RegexpMatcherFactory.java View File

@@ -17,14 +17,15 @@


package org.apache.tools.ant.util.regexp; package org.apache.tools.ant.util.regexp;


import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.Project; import org.apache.tools.ant.Project;
import org.apache.tools.ant.MagicNames;
import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.util.ClasspathUtils; import org.apache.tools.ant.util.ClasspathUtils;


/** /**
* Simple Factory Class that produces an implementation of * Simple Factory Class that produces an implementation of
* RegexpMatcher based on the system property * RegexpMatcher based on the system property
* <code>ant.regexp.matcherimpl</code> and the classes
* <code>ant.regexp.regexpimpl</code> and the classes
* available. * available.
* *
* <p>In a more general framework this class would be abstract and * <p>In a more general framework this class would be abstract and
@@ -57,9 +58,9 @@ public class RegexpMatcherFactory {
throws BuildException { throws BuildException {
String systemDefault = null; String systemDefault = null;
if (p == null) { if (p == null) {
systemDefault = System.getProperty("ant.regexp.regexpimpl");
systemDefault = System.getProperty(MagicNames.REGEXP_IMPL);
} else { } else {
systemDefault = p.getProperty("ant.regexp.regexpimpl");
systemDefault = p.getProperty(MagicNames.REGEXP_IMPL);
} }


if (systemDefault != null) { if (systemDefault != null) {


Loading…
Cancel
Save