public class StdFixedValueLoader extends FixedValueLoader implements StandardLoader
AndHowInit interface during initialization to
read your configuration. That looks like this:
import org.yarnandtail.andhow.*;
import org.yarnandtail.andhow.property.StrProp;
public class SetFixedValues implements AndHowInit {
@Override public AndHowConfiguration getConfiguration() {
return StdConfig.instance()
.addFixedValue(MY_PROP, "some value"); //MY_PROP is some visible property
}
}
Alternatively you can use AndHow.findConfig() at an application entry
point such as the main method.
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().unknownPropertyAProblem, values| Constructor and Description |
|---|
StdFixedValueLoader()
There is no reason to use the constructor in production application code
because AndHow creates a single instance on demand at runtime.
|
getLoaderDialect, getLoaderType, getSpecificLoadDescription, isTrimmingRequiredForStringValues, isUnknownPropertyAProblem, load, releaseResources, setPropertyValues, setPropertyValues, setUnknownPropertyAProblemattemptToAdd, attemptToAdd, createValue, findDuplicateProperty, getClassConfig, getConfigSamplePrinter, getInstanceConfigclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetClassConfig, getConfigSamplePrinter, getInstanceConfig, getLoaderDialect, getLoaderType, getSpecificLoadDescription, isTrimmingRequiredForStringValues, load, releaseResourcesCopyright © 2021. All rights reserved.