Package org.nuiton.util
Class RecursiveProperties
java.lang.Object
java.util.Dictionary<K,V>
java.util.Hashtable<java.lang.Object,java.lang.Object>
java.util.Properties
org.nuiton.util.RecursiveProperties
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable,java.util.Map<java.lang.Object,java.lang.Object>
public class RecursiveProperties
extends java.util.Properties
Overrides
Properties in order to check if the expected value
contains another property key like "${...}". It that case, the key
will be replaced by its value if possible.
Example :
myFirstName=Arnaud
myName=Thimel
org.nuiton.topia.userInfo.fullName=${fullName}
fullName=${myFirstName} ${myName}
namePhrase=My name is ${myName}.
instruction=Put your text like this : ${myText}
Dans ce cas,
- getProperty("org.nuiton.topia.userInfo.fullName") renverra "Arnaud Thimel"
- getProperty("namePhrase") renverra "My name is Thimel."
- getProperty("instruction") renverra "Put your text like this : ${myText}"
- Author:
- Arnaud Thimel - thimel@codelutin.com
- See Also:
- Serialized Form
-
Field Summary
-
Constructor Summary
Constructors Constructor Description RecursiveProperties()RecursiveProperties(java.util.Properties defaults) -
Method Summary
Modifier and Type Method Description java.lang.StringgetProperty(java.lang.String key)Methods inherited from class java.util.Properties
clear, clone, compute, computeIfAbsent, computeIfPresent, contains, containsKey, containsValue, elements, entrySet, equals, forEach, get, getOrDefault, getProperty, hashCode, isEmpty, keys, keySet, list, list, load, load, loadFromXML, merge, propertyNames, put, putAll, putIfAbsent, rehash, remove, remove, replace, replace, replaceAll, save, setProperty, size, store, store, storeToXML, storeToXML, storeToXML, stringPropertyNames, toString, values
-
Constructor Details
-
RecursiveProperties
public RecursiveProperties() -
RecursiveProperties
public RecursiveProperties(java.util.Properties defaults)
-
-
Method Details
-
getProperty
public java.lang.String getProperty(java.lang.String key)- Overrides:
getPropertyin classjava.util.Properties
-