org.figure8.join.util
Class AntHelper

java.lang.Object
  extended by org.figure8.join.util.AntHelper

public class AntHelper
extends java.lang.Object

Helper class that provides Ant style constructions convenient methods such as ${xxx} properties replacing in strings.

Version:
$Revision: 1.2 $
Author:
Laurent Broudoux

Constructor Summary
AntHelper()
           
 
Method Summary
static java.lang.String replaceProperties(java.lang.String value, java.util.Map keys)
          Replaces ${xxx} Ant style constructions in the given value with the string value of the corresponding data types.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AntHelper

public AntHelper()
Method Detail

replaceProperties

public static java.lang.String replaceProperties(java.lang.String value,
                                                 java.util.Map keys)
                                          throws java.text.ParseException
Replaces ${xxx} Ant style constructions in the given value with the string value of the corresponding data types.

Parameters:
value - The string to be scanned for property references. May be null, in which case this method returns immediately with no effect.
keys - Mapping (String to String) of property names to their values. Must not be null.
Returns:
the original string with the properties replaced, or null if the original string is null.
Throws:
java.text.ParseException - if the string contains an opening ${ without a closing }


Copyright © 2005-2008 Join. All Rights Reserved.