public class RuntimePropertiesImpl extends Object implements RuntimeProperties
RuntimeProperties interface.
The RuntimePropertiesImpl load the first properties file found (with
"key=value" entries) in one of several default locations determined by the
RuntimeUtility.toAppConfigDirs() method.
At the time of this writing (2015-11-12), the locations which to seek for the
first occurrence of the properties file are determined as follows:
The applications base directory (where your JAR or your classes reside) is
taken and a list of directories relative to this base directory is generated
as defined in the Folders.CONFIG_DIRS enumeration: The actual
directories being returned (in case them exist) are as follows, relative to
your applications base directory:
SystemProperty.CONFIG_DIR.
Any property overridden by an equivalent system property or an equivalent
environment variable is, when requested, replaced by the overridden one; in
that order: If there is an equivalent system property, then this one is
retrieved, else if there is an equivalent environment variable, then that is
used, else the one stored in this Properties instance is taken. See
PropertyBuilder on how equivalent system properties and equivalent
environment variables are determined.
The above mentioned mechanism is applied to all related methods (e.g.
PropertiesAccessorMixin.getBoolean(String) or PropertiesAccessorMixin.getLong(String)).RuntimeProperties.MutableRuntimeProperties, RuntimeProperties.RuntimePropertiesBuilderorg.refcodes.structure.ProfileProperties.MutableProfileProperties, org.refcodes.structure.ProfileProperties.ProfilePropertiesBuilderorg.refcodes.structure.Properties.MutableProperties, org.refcodes.structure.Properties.PropertiesBuilderorg.refcodes.structure.CanonicalMap.CanonicalMapBuilder, org.refcodes.structure.CanonicalMap.MutableCanonicalMaporg.refcodes.structure.PathMap.MutablePathMap<T>, org.refcodes.structure.PathMap.PathMapBuilder<T>org.refcodes.structure.Dictionary.MutableDictionary<K,V>org.refcodes.structure.Keys.MutableKeys<K,V>, org.refcodes.structure.Keys.MutableValues<K,V>org.refcodes.mixin.DelimiterAccessor.DelimiterBuilder<B extends org.refcodes.mixin.DelimiterAccessor.DelimiterBuilder<B>>, org.refcodes.mixin.DelimiterAccessor.DelimiterMutator, org.refcodes.mixin.DelimiterAccessor.DelimiterProperty| Modifier and Type | Field and Description |
|---|---|
protected RuntimeProperties.RuntimePropertiesBuilder |
_properties |
| Constructor and Description |
|---|
RuntimePropertiesImpl(File aFile)
Instantiates a new runtime properties impl.
|
RuntimePropertiesImpl(Map<?,?> aProperties)
Instantiates a new runtime properties impl.
|
RuntimePropertiesImpl(org.refcodes.structure.ProfileProperties aProperties)
Instantiates a new runtime properties impl.
|
RuntimePropertiesImpl(org.refcodes.structure.Properties aProperties)
Instantiates a new runtime properties impl.
|
RuntimePropertiesImpl(String aFilePath)
Instantiates a new runtime properties impl.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
containsKey(Object aKey) |
String |
get(Object aKey) |
char |
getDelimiter() |
String |
getRuntimeProfilesPath() |
Class<String> |
getType() |
boolean |
isEmpty() |
Set<String> |
keySet() |
RuntimeProperties |
retrieveFrom(String aFromPath)
Retrieve from.
|
RuntimeProperties |
retrieveTo(String aToPath)
Retrieve to.
|
int |
size() |
Object |
toDataStructure(String aPath) |
Collection<String> |
values() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitretrieve, toRuntimeProperties, toRuntimeProperties, toRuntimeProperties, toRuntimeProperties, toRuntimeProperties, toRuntimePropertiesgetRuntimeProfiles, toProfileProperties, toProfileProperties, toProfileProperties, toProfileProperties, toProfileProperties, toProfileProperties, toProfileProperties, toRuntimeProfile, toRuntimeProfilecontainsValue, fromProperties, saveTo, saveTo, saveTo, saveTo, saveTo, saveTo, toMap, toProperties, toProperties, toProperties, toProperties, toProperties, toProperties, toProperties, toPropertyPathdirectories, directories, entries, entries, getArray, getArray, hasParentPath, isArray, isArray, isDirectory, isEntry, isRecord, isRootPath, keySet, paths, paths, records, records, toDataStructure, toMap, toNormalizedPath, toNormalizedPath, toParentPath, toPathMap, toPathMap, toPathMap, toPathMap, toPathMap, toPathMap, toPathMap, toPathMap, toRootPathprotected RuntimeProperties.RuntimePropertiesBuilder _properties
public RuntimePropertiesImpl(File aFile) throws IOException
aFile - the a fileIOException - Signals that an I/O exception has occurred.public RuntimePropertiesImpl(String aFilePath) throws IOException
aFilePath - the a file pathIOException - Signals that an I/O exception has occurred.public RuntimePropertiesImpl(org.refcodes.structure.Properties aProperties)
aProperties - the a propertiespublic RuntimePropertiesImpl(org.refcodes.structure.ProfileProperties aProperties)
aProperties - the a propertiespublic RuntimePropertiesImpl(Map<?,?> aProperties)
aProperties - the a propertiespublic boolean containsKey(Object aKey)
public Collection<String> values()
public int size()
size in interface org.refcodes.structure.Containablepublic boolean isEmpty()
isEmpty in interface org.refcodes.structure.Containablepublic RuntimeProperties retrieveFrom(String aFromPath)
RuntimePropertiesretrieveFrom in interface RuntimePropertiesretrieveFrom in interface org.refcodes.structure.PathMap<String>retrieveFrom in interface org.refcodes.structure.ProfilePropertiesretrieveFrom in interface org.refcodes.structure.PropertiesaFromPath - the a from pathpublic RuntimeProperties retrieveTo(String aToPath)
RuntimePropertiesretrieveTo in interface RuntimePropertiesretrieveTo in interface org.refcodes.structure.PathMap<String>retrieveTo in interface org.refcodes.structure.ProfilePropertiesretrieveTo in interface org.refcodes.structure.PropertiesaToPath - the a to pathpublic char getDelimiter()
getDelimiter in interface org.refcodes.mixin.DelimiterAccessorpublic Class<String> getType()
getType in interface org.refcodes.mixin.TypeAccessor<String>public Object toDataStructure(String aPath)
toDataStructure in interface org.refcodes.structure.PathMap<String>public String getRuntimeProfilesPath()
getRuntimeProfilesPath in interface org.refcodes.structure.ProfilePropertiesCopyright © 2017. All rights reserved.