From 8ed6a2cd98605d409cd47a75ae6fa75b6e8511bf Mon Sep 17 00:00:00 2001 From: Peter Reilly Date: Mon, 24 Jan 2005 15:15:39 +0000 Subject: [PATCH] javadoc git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@277440 13f79535-47bb-0310-9956-ffa450edef68 --- .../tools/ant/util/RegexpPatternMapper.java | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/main/org/apache/tools/ant/util/RegexpPatternMapper.java b/src/main/org/apache/tools/ant/util/RegexpPatternMapper.java index e315d4f26..18ae2c785 100644 --- a/src/main/org/apache/tools/ant/util/RegexpPatternMapper.java +++ b/src/main/org/apache/tools/ant/util/RegexpPatternMapper.java @@ -1,5 +1,5 @@ /* - * Copyright 2000,2002-2004 The Apache Software Foundation + * Copyright 2000,2002-2005 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -32,6 +32,10 @@ public class RegexpPatternMapper implements FileNameMapper { protected char[] to = null; protected StringBuffer result = new StringBuffer(); + /** + * Constructor for RegexpPatternMapper. + * @throws BuildException on error. + */ public RegexpPatternMapper() throws BuildException { reg = (new RegexpMatcherFactory()).newRegexpMatcher(); } @@ -66,6 +70,8 @@ public class RegexpPatternMapper implements FileNameMapper { /** * Sets the "from" pattern. Required. + * @param from the from pattern. + * @throws BuildException on error. */ public void setFrom(String from) throws BuildException { try { @@ -80,6 +86,8 @@ public class RegexpPatternMapper implements FileNameMapper { /** * Sets the "to" pattern. Required. + * @param to the to pattern. + * @throws BuildException on error. */ public void setTo(String to) { this.to = to.toCharArray(); @@ -89,6 +97,9 @@ public class RegexpPatternMapper implements FileNameMapper { * Returns null if the source file name doesn't match the * "from" pattern, an one-element array containing the * translated file otherwise. + * @param sourceFileName the source file name + * @return a one-element array containing the translated file or + * null if the to pattern did not match */ public String[] mapFileName(String sourceFileName) { if (handleDirChar) { @@ -106,6 +117,8 @@ public class RegexpPatternMapper implements FileNameMapper { /** * Replace all backreferences in the to pattern with the matched * groups of the source. + * @param source the source file name. + * @return the translated file name. */ protected String replaceReferences(String source) { Vector v = reg.getGroups(source, regexpOptions);