Package org.apache.tools.ant.util.regexp
Class RegexpMatcherFactory
- java.lang.Object
- 
- org.apache.tools.ant.util.regexp.RegexpMatcherFactory
 
- 
- Direct Known Subclasses:
- RegexpFactory
 
 public class RegexpMatcherFactory extends java.lang.ObjectSimple Factory Class that produces an implementation of RegexpMatcher based on the system propertyant.regexp.regexpimpland the classes available.In a more general framework this class would be abstract and have a static newInstance method. 
- 
- 
Constructor SummaryConstructors Constructor Description RegexpMatcherFactory()
 - 
Method SummaryModifier and Type Method Description protected RegexpMatchercreateInstance(java.lang.String className)Create an instance of a matcher from a classname.RegexpMatchernewRegexpMatcher()Create a new regular expression instance.RegexpMatchernewRegexpMatcher(Project p)Create a new regular expression instance.static booleanregexpMatcherPresent(Project project)Checks if a RegExp-Matcher is available.protected voidtestAvailability(java.lang.String className)Test if a particular class is available to be used.
 
- 
- 
- 
Method Detail- 
newRegexpMatcherpublic RegexpMatcher newRegexpMatcher() throws BuildException Create a new regular expression instance.- Returns:
- the matcher
- Throws:
- BuildException- on error
 
 - 
newRegexpMatcherpublic RegexpMatcher newRegexpMatcher(Project p) throws BuildException Create a new regular expression instance.- Parameters:
- p- Project whose ant.regexp.regexpimpl property will be used.
- Returns:
- the matcher
- Throws:
- BuildException- on error
 
 - 
createInstanceprotected RegexpMatcher createInstance(java.lang.String className) throws BuildException Create an instance of a matcher from a classname.- Parameters:
- className- a- Stringvalue
- Returns:
- a RegexpMatchervalue
- Throws:
- BuildException- if an error occurs
 
 - 
testAvailabilityprotected void testAvailability(java.lang.String className) throws BuildExceptionTest if a particular class is available to be used.- Parameters:
- className- a- Stringvalue
- Throws:
- BuildException- if an error occurs
 
 - 
regexpMatcherPresentpublic static boolean regexpMatcherPresent(Project project) Checks if a RegExp-Matcher is available.- Parameters:
- project- The project to check for (may be- null)
- Returns:
- trueif available otherwise- false
 
 
- 
 
-