Configuration Flavors
This discussion is about configuration flavors, meaning the type of configuration that should be possible. Most of configuration libraries on the market on a low level are using
Strings as main representation type of configuration. Though for many use cases this is completely sufficient, I think configuration should support basically also other types:
- All basic data types such as Boolean, Character, Byte, Short, Long, Float, Double, BigDecimal, BigInteger.
- Collections and arrays.
- But also binary types may be supported, e.g. for reading jars, wars or ears for configuring a deployment.
As a consequence we might define a ConfigEntry similar like
public interface ConfigEntry<T>{
CLass<T> getEntryType();
T getValue();
String getKey();
String getOrigin();
// to be discussed later/separatelly:
// - scope
// - attributes
}
Note that a ConfigEntry models the generic container for a configuration entry, not how the API for access may look like.