org.nuiton.util
Class RecursiveProperties

java.lang.Object
  extended by java.util.Dictionary<K,V>
      extended by java.util.Hashtable<Object,Object>
          extended by java.util.Properties
              extended by org.nuiton.util.RecursiveProperties
All Implemented Interfaces:
Serializable, Cloneable, Map<Object,Object>

public class RecursiveProperties
extends Properties

Surcharge java.util.Properties de manière à aller chercher dans les properties la valeur de la propriété si celle ci est encadrée par "${...}".

Exemple : myFirstName=Arnaud myName=Thimel org.nuiton.topia.userInfo.fullName=${fullName} fullName=${myFirstName} ${myName} namePhrase=My name is ${myName}. instruction=Placez votre texte comme ceci : ${monTexte}

Dans ce cas, getProperty("org.nuiton.topia.userInfo.fullName") renverra "Arnaud Thimel" getProperty("namePhrase") renverra "My name is Thimel." getProperty("instruction") renverra "Placez votre texte comme ceci : ${monTexte}"

Author:
thimel
See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.Properties
defaults
 
Constructor Summary
RecursiveProperties()
           
RecursiveProperties(Properties defaults)
           
 
Method Summary
 String getProperty(String key)
           
 
Methods inherited from class java.util.Properties
getProperty, list, list, load, load, loadFromXML, propertyNames, save, setProperty, store, store, storeToXML, storeToXML, stringPropertyNames
 
Methods inherited from class java.util.Hashtable
clear, clone, contains, containsKey, containsValue, elements, entrySet, equals, get, hashCode, isEmpty, keys, keySet, put, putAll, rehash, remove, size, toString, values
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RecursiveProperties

public RecursiveProperties()

RecursiveProperties

public RecursiveProperties(Properties defaults)
Method Detail

getProperty

public String getProperty(String key)
Overrides:
getProperty in class Properties


Copyright © 2004-2009 CodeLutin. All Rights Reserved.