public class StdSysPropLoader extends MapLoader implements StandardLoader
java.lang.System.getProperties().
Over the lifecycle of the JVM, values of system properties can change
so this loader is working from a snapshot of the system properties it finds
at the time of AndHow initialization.
Once loaded, AndHow property values never change.
FlgProp properties (true/false flags), the StdSysPropLoader
will set the Property's value to true if a matching environment variable is found,
even if the value of the property is empty. System properties can be cleared via
java.lang.System.clearProperty(name), which is how a flag value could
be unset prior to AndHow loading.
java -Dfull.name.of.MY_PROPERTY=someValue -jar MyJarName.jar
StandardLoader's, this loader is intended to be auto-created
by AndHow. The set of standard loaders and their order can bet set
via the AndHowConfiguration.setStandardLoaders() methods.
Other loaders which don't implement the StandardLoader interface can
be inserted into the load order via the
AndHowConfiguration.insertLoaderBefore/After().map, unknownPropertyAProblem| Constructor and Description |
|---|
StdSysPropLoader()
There is no reason to use the constructor in production application code
because AndHow creates a single instance on demand at runtime.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getLoaderType()
The type of the loader, such as JNDI, PropertyFile, SystemProperty,
etc..
|
Map<?,?> |
getMap() |
String |
getSpecificLoadDescription()
For this particular load, where was info loaded from?
This may vary from run to run based on config params.
|
boolean |
isTrimmingRequiredForStringValues()
If true, values for string properties are trimmed by the Trimmer of
the property they are associated with.
|
getLoaderDialect, isUnknownPropertyAProblem, load, releaseResources, setMap, setUnknownPropertyAProblemattemptToAdd, attemptToAdd, attemptToAdd, attemptToAddIfNotDuplicate, createValue, findDuplicateProperty, getClassConfig, getConfigSamplePrinter, getInstanceConfig, mapNametoPropertyclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetClassConfig, getConfigSamplePrinter, getInstanceConfig, getLoaderDialect, load, releaseResourcespublic StdSysPropLoader()
public String getSpecificLoadDescription()
LoadergetSpecificLoadDescription in interface LoadergetSpecificLoadDescription in class MapLoaderpublic boolean isTrimmingRequiredForStringValues()
LoaderisTrimmingRequiredForStringValues in interface LoaderisTrimmingRequiredForStringValues in class MapLoaderpublic String getLoaderType()
LoadergetLoaderType in interface LoadergetLoaderType in class MapLoaderCopyright © 2021. All rights reserved.