/*** * Create a new regular expression instance. * @return the matcher * @throws BuildException on error */ public RegexpMatcher newRegexpMatcher() throws BuildException { return newRegexpMatcher(null); }
/** * Constructor for RegexpPatternMapper. * @throws BuildException on error. */ public RegexpPatternMapper() throws BuildException { reg = (new RegexpMatcherFactory()).newRegexpMatcher(); }
/** * Checks if a RegExp-Matcher is available. * @param project The project to check for (may be <code>null</code>) * @return <code>true</code> if available otherwise <code>false</code> */ public static boolean regexpMatcherPresent(Project project) { try { // The factory throws a BuildException if no usable matcher // cannot be instantiated. We don't need the matcher itself here. new RegexpMatcherFactory().newRegexpMatcher(project); return true; } catch (Throwable ex) { return false; } } }
RegexpMatcher matcher = matchMaker.newRegexpMatcher(); matcher.setPattern(r.regex); for (String name : props.keySet()) {