From 150cad6b1e9f2c87108b2e1db7ba822344d383db Mon Sep 17 00:00:00 2001 From: Peter Donald Date: Sat, 1 Dec 2001 03:33:57 +0000 Subject: [PATCH] Add a method replaceProperties(Project,String). This delegates directly to replaceProperties(Project,String,HashMap). The Map parameter contains all the properties in Project. This makes it easier to have a lighter coupling between tasks and Project. git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@270062 13f79535-47bb-0310-9956-ffa450edef68 --- src/main/org/apache/tools/ant/ProjectHelper.java | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/main/org/apache/tools/ant/ProjectHelper.java b/src/main/org/apache/tools/ant/ProjectHelper.java index 742623fd3..eef34445d 100644 --- a/src/main/org/apache/tools/ant/ProjectHelper.java +++ b/src/main/org/apache/tools/ant/ProjectHelper.java @@ -722,7 +722,19 @@ public class ProjectHelper { IntrospectionHelper ih = IntrospectionHelper.getHelper(parent.getClass()); ih.storeElement(project, parent, child, tag); } - + + /** + * Replace ${} style constructions in the given value with the string value of + * the corresponding data types. + * + * @param value the string to be scanned for property references. + * @since 1.5 + */ + public static String replaceProperties(Project project, String value) + throws BuildException { + return replaceProperties(project,value,project.getProperties()); + } + /** * Replace ${} style constructions in the given value with the string value of * the corresponding data types.