Package org.refcodes.configuration
Class SystemProperties
- java.lang.Object
-
- org.refcodes.configuration.SystemProperties
-
- All Implemented Interfaces:
Properties
,org.refcodes.mixin.DelimiterAccessor
,org.refcodes.mixin.Dumpable
,org.refcodes.mixin.TypeAccessor<java.lang.String>
,org.refcodes.structure.CanonicalMap
,org.refcodes.structure.Containable
,org.refcodes.structure.Dictionary<java.lang.String,T>
,org.refcodes.structure.Keys<java.lang.String,T>
,org.refcodes.structure.PathMap<java.lang.String>
,org.refcodes.structure.PropertiesAccessorMixin
public class SystemProperties extends java.lang.Object implements Properties
Extension of theProperties
type overwriting methods in order to access system properties as passed via the "-Dkey=value" when launching the JVM (e.g.java -Dconsole.width=220) The keys are transformed to a system properties by removing a prefixed "/" path delimiter (as ofProperties.getDelimiter()
and converting all other path delimiters "/" to the system property's (de facto standard) separator ".". If accessing failed, then the lower case version of the so transformed key is probed. Accessing a system property "console.width" would be done with the path "/console/width".
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.refcodes.structure.CanonicalMap
org.refcodes.structure.CanonicalMap.CanonicalMapBuilder, org.refcodes.structure.CanonicalMap.MutableCanonicalMap
-
Nested classes/interfaces inherited from interface org.refcodes.mixin.DelimiterAccessor
org.refcodes.mixin.DelimiterAccessor.DelimiterBuilder<B extends org.refcodes.mixin.DelimiterAccessor.DelimiterBuilder<B>>, org.refcodes.mixin.DelimiterAccessor.DelimiterMutator, org.refcodes.mixin.DelimiterAccessor.DelimiterProperty
-
Nested classes/interfaces inherited from interface org.refcodes.structure.Dictionary
org.refcodes.structure.Dictionary.MutableDictionary<K extends java.lang.Object,V extends java.lang.Object>
-
Nested classes/interfaces inherited from interface org.refcodes.structure.Keys
org.refcodes.structure.Keys.MutableKeys<K extends java.lang.Object,V extends java.lang.Object>, org.refcodes.structure.Keys.MutableValues<K extends java.lang.Object,V extends java.lang.Object>
-
Nested classes/interfaces inherited from interface org.refcodes.structure.PathMap
org.refcodes.structure.PathMap.MutablePathMap<T extends java.lang.Object>, org.refcodes.structure.PathMap.PathMapBuilder<T extends java.lang.Object>
-
Nested classes/interfaces inherited from interface org.refcodes.configuration.Properties
Properties.MutableProperties, Properties.PropertiesBuilder
-
Nested classes/interfaces inherited from interface org.refcodes.structure.PropertiesAccessorMixin
org.refcodes.structure.PropertiesAccessorMixin.PropertiesBuilderMixin<T extends java.lang.Object>, org.refcodes.structure.PropertiesAccessorMixin.PropertiesMixin, org.refcodes.structure.PropertiesAccessorMixin.PropertiesMutatorMixin
-
-
Field Summary
-
Fields inherited from interface org.refcodes.configuration.Properties
DEFAULT_COMMENT
-
-
Constructor Summary
Constructors Constructor Description SystemProperties()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
containsKey(java.lang.Object aKey)
The key is transformed to an system property variable by removing a prefixed "/" path delimiter (as ofProperties.getDelimiter()
and converting all other path delimiters "/" to the system property's (de facto standard) separator ".".java.lang.String
get(java.lang.Object aKey)
The key is transformed to a system property by removing a prefixed "/" path delimiter (as ofProperties.getDelimiter()
and converting all other path delimiters "/" to the system property's (de facto standard) separator ".".boolean
isEmpty()
java.util.Set<java.lang.String>
keySet()
The keys are transformed to a path by prefixing a "/" path delimiter (as ofProperties.getDelimiter()
and converting all other system property's (de facto standard) separators "." to the path delimiter "/".Properties
retrieveFrom(java.lang.String aFromPath)
Properties
retrieveTo(java.lang.String aToPath)
int
size()
java.lang.Object
toDataStructure(java.lang.String aFromPath)
java.util.Collection<java.lang.String>
values()
-
Methods inherited from interface org.refcodes.structure.CanonicalMap
toInstance, toInstance, toType, toType
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.refcodes.structure.PathMap
children, children, children, directories, directories, directories, directories, directories, fromExternalKey, get, get, getArray, getArray, getBoolean, getBoolean, getByte, getByte, getCharacter, getCharacter, getDouble, getDouble, getFloat, getFloat, getIndexes, getIndexes, getInteger, getInteger, getLong, getLong, getRootPath, getShort, getShort, hasChildren, hasChildren, hasChildren, hasIndexed, hasIndexed, hasParentPath, isArray, isArray, isArray, isArray, isArray, isChild, isChild, isChild, isDirectory, isDirectory, isDirectory, isDirectory, isIndexed, isIndexed, isPath, isRecord, isRecord, isRecord, isRecord, isRootPath, keySet, paths, paths, paths, paths, paths, queryPaths, records, records, records, records, records, toDataStructure, toExternalKey, toMap, toNormalizedPath, toNormalizedPath, toParentPath, toPath, toPath
-
Methods inherited from interface org.refcodes.configuration.Properties
containsValue, getDelimiter, getIndexed, getIndexed, getType, query, query, queryFrom, queryTo, retrieve, retrieveFrom, retrieveFrom, retrieveFrom, retrieveTo, retrieveTo, retrieveTo, toMap, toProperties, toPropertyPath
-
Methods inherited from interface org.refcodes.structure.PropertiesAccessorMixin
asArray, asArray, asArray, asArray, asArray, asArray, asBooleanArray, asBooleanArray, asBooleanArray, asBooleanArray, asBooleanArray, asBooleanArray, asByteArray, asByteArray, asByteArray, asByteArray, asByteArray, asByteArray, asCharacterArray, asCharacterArray, asCharacterArray, asCharacterArray, asCharacterArray, asCharacterArray, asDoubleArray, asDoubleArray, asDoubleArray, asDoubleArray, asDoubleArray, asDoubleArray, asFloatArray, asFloatArray, asFloatArray, asFloatArray, asFloatArray, asFloatArray, asIntegerArray, asIntegerArray, asIntegerArray, asIntegerArray, asIntegerArray, asIntegerArray, asLongArray, asLongArray, asLongArray, asLongArray, asLongArray, asLongArray, asShortArray, asShortArray, asShortArray, asShortArray, asShortArray, asShortArray, containsKey, get, getBoolean, getBoolean, getBoolean, getByte, getByte, getByte, getCharacter, getCharacter, getCharacter, getDouble, getDouble, getDouble, getFloat, getFloat, getFloat, getInteger, getInteger, getInteger, getLong, getLong, getLong, getShort, getShort, getShort, use, useBoolean, useBoolean, useByte, useByte, useDouble, useDouble, useFloat, useFloat, useInteger, useInteger, useLong, useLong, useShort, useShort
-
-
-
-
Method Detail
-
get
public java.lang.String get(java.lang.Object aKey)
The key is transformed to a system property by removing a prefixed "/" path delimiter (as ofProperties.getDelimiter()
and converting all other path delimiters "/" to the system property's (de facto standard) separator ".". If accessing failed, then the lower case version of the so transformed key is probed.- Specified by:
get
in interfaceorg.refcodes.structure.Keys<java.lang.String,T extends java.lang.Object>
-
containsKey
public boolean containsKey(java.lang.Object aKey)
The key is transformed to an system property variable by removing a prefixed "/" path delimiter (as ofProperties.getDelimiter()
and converting all other path delimiters "/" to the system property's (de facto standard) separator ".". If accessing failed, then the lower case version of the so transformed key is probed.- Specified by:
containsKey
in interfaceorg.refcodes.structure.Keys<java.lang.String,T extends java.lang.Object>
-
keySet
public java.util.Set<java.lang.String> keySet()
The keys are transformed to a path by prefixing a "/" path delimiter (as ofProperties.getDelimiter()
and converting all other system property's (de facto standard) separators "." to the path delimiter "/".- Specified by:
keySet
in interfaceorg.refcodes.structure.Keys<java.lang.String,T extends java.lang.Object>
-
values
public java.util.Collection<java.lang.String> values()
- Specified by:
values
in interfaceorg.refcodes.structure.Keys<java.lang.String,T extends java.lang.Object>
-
size
public int size()
- Specified by:
size
in interfaceorg.refcodes.structure.Containable
-
toDataStructure
public java.lang.Object toDataStructure(java.lang.String aFromPath)
- Specified by:
toDataStructure
in interfaceorg.refcodes.structure.PathMap<java.lang.String>
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interfaceorg.refcodes.structure.Containable
-
retrieveFrom
public Properties retrieveFrom(java.lang.String aFromPath)
- Specified by:
retrieveFrom
in interfaceorg.refcodes.structure.CanonicalMap
- Specified by:
retrieveFrom
in interfaceorg.refcodes.structure.PathMap<java.lang.String>
- Specified by:
retrieveFrom
in interfaceProperties
-
retrieveTo
public Properties retrieveTo(java.lang.String aToPath)
- Specified by:
retrieveTo
in interfaceorg.refcodes.structure.CanonicalMap
- Specified by:
retrieveTo
in interfaceorg.refcodes.structure.PathMap<java.lang.String>
- Specified by:
retrieveTo
in interfaceProperties
-
-