Package io.ultreia.java4all.util
Class RecursiveProperties
- java.lang.Object
-
- java.util.Dictionary<K,V>
-
- java.util.Hashtable<Object,Object>
-
- java.util.Properties
-
- io.ultreia.java4all.util.RecursiveProperties
-
- All Implemented Interfaces:
Serializable,Cloneable,Map<Object,Object>
public class RecursiveProperties extends Properties
OverridesPropertiesin 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=John myName=Doe org.nuiton.topia.userInfo.fullName=${fullName} fullName=${myFirstName} ${myName} namePhrase=My name is ${myName}. instruction=Put your text like this : ${myText}Then:
getProperty("org.nuiton.topia.userInfo.fullName")→"John Doe"getProperty("namePhrase")→"My name is Doe."getProperty("instruction")→"Put your text like this : ${myText}"
Created by tchemit on 29/12/2017.
- Author:
- Tony Chemit - dev@tchemit.fr, Arnaud Thimel - thimel@codelutin.com
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class java.util.Properties
defaults
-
-
Constructor Summary
Constructors Constructor Description RecursiveProperties()RecursiveProperties(String variableStart, String variableEnd)RecursiveProperties(Properties defaults)RecursiveProperties(Properties defaults, String variableStart, String variableEnd)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetProperty(String key)Stringresolve(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 Detail
-
RecursiveProperties
public RecursiveProperties(Properties defaults, String variableStart, String variableEnd)
-
RecursiveProperties
public RecursiveProperties()
-
RecursiveProperties
public RecursiveProperties(Properties defaults)
-
-
Method Detail
-
getProperty
public String getProperty(String key)
- Overrides:
getPropertyin classProperties
-
-