public abstract class AbstractConfiguration2 extends java.lang.Object implements Configuration2
| Modifier and Type | Class and Description |
|---|---|
protected static class |
AbstractConfiguration2.PropertyValue
A property value.
|
| Modifier and Type | Field and Description |
|---|---|
protected java.util.Map<java.lang.String,java.lang.Class<?>> |
propertiesTypes
The Map of properties values.
|
protected java.util.Map<java.lang.String,AbstractConfiguration2.PropertyValue> |
propertiesValues
The Map of properties types.
|
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractConfiguration2() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addProperty(java.lang.String key,
java.lang.Class<?> type,
java.lang.Object defaultValue)
Add a property key and its type.
|
protected void |
addProperty(java.lang.String key,
java.lang.Class<?> type,
java.lang.Object defaultValue,
boolean hasCustomSetter)
Add a property key and its type.
|
protected java.lang.Object |
getCustomPropertyValue(java.lang.String key)
Return a property value for custom property setters.
|
java.util.SortedMap<java.lang.String,java.lang.Class<?>> |
getPropertiesTypes()
Return a sorted Map with the properties keys and their type.
|
java.lang.Object |
getPropertyValue(java.lang.String key)
Return the value for a property.
|
boolean |
hasCustomPropertySetter(java.lang.String key)
Return true if there is a custom property setter for a property key.
|
protected void |
setCustomPropertyValue(java.lang.String key,
java.lang.Object value)
Set a property value for custom property setters.
|
void |
setPropertyValue(java.lang.String key,
java.lang.Object value)
Set the value for a property.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetConfiguration, getPrefValue, getPropertyValueAsBoolean, getPropertyValueAsChar, getPropertyValueAsFile, getPropertyValueAsFloat, getPropertyValueAsInt, getPropertyValueAsLong, getPropertyValueAsString, getPropertyValueAsURL, isShowingWarnings, putConfiguration, putPrefValue, warningsetupApplicationDescprotected final java.util.Map<java.lang.String,java.lang.Class<?>> propertiesTypes
protected final java.util.Map<java.lang.String,AbstractConfiguration2.PropertyValue> propertiesValues
protected final void addProperty(java.lang.String key,
java.lang.Class<?> type,
java.lang.Object defaultValue)
key - the property keytype - the property typedefaultValue - the property default valueprotected final void addProperty(java.lang.String key,
java.lang.Class<?> type,
java.lang.Object defaultValue,
boolean hasCustomSetter)
hasCustomSetter is true, the property has a custom property setter:
key - the property keytype - the property typedefaultValue - the property default valuehasCustomSetter - true for a custom property setterpublic final boolean hasCustomPropertySetter(java.lang.String key)
key - property the keypublic final java.util.SortedMap<java.lang.String,java.lang.Class<?>> getPropertiesTypes()
getPropertiesTypes in interface Configuration2public void setPropertyValue(java.lang.String key,
java.lang.Object value)
hasCustomPropertySetter(java.lang.String)).setPropertyValue in interface Configuration2key - the property keyvalue - the property valuepublic java.lang.Object getPropertyValue(java.lang.String key)
hasCustomPropertySetter(java.lang.String)).getPropertyValue in interface Configuration2key - the property keyprotected void setCustomPropertyValue(java.lang.String key,
java.lang.Object value)
key - the property keyvalue - the property valueprotected java.lang.Object getCustomPropertyValue(java.lang.String key)
key - the property key