- java.lang.Object
-
- org.github.gestalt.config.loader.EnvironmentVarsLoader
-
- All Implemented Interfaces:
ConfigLoader
public final class EnvironmentVarsLoader extends java.lang.Object implements ConfigLoader
Loads Environment Variables from EnvironmentConfigSource.
-
-
Constructor Summary
Constructors Constructor Description EnvironmentVarsLoader()Construct a default Environment Variables Loader using the default path lexer for "_" separated paths.EnvironmentVarsLoader(SentenceLexer lexer, ConfigParser parser)Constructor for Environment Variables Loader.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaccepts(java.lang.String format)True if the config loader accepts the format.GResultOf<java.util.List<ConfigNodeContainer>>loadSource(ConfigSource source)Load a ConfigSource then build the validated config node.java.lang.Stringname()Name of the config loader.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.github.gestalt.config.loader.ConfigLoader
applyConfig
-
-
-
-
Constructor Detail
-
EnvironmentVarsLoader
public EnvironmentVarsLoader()
Construct a default Environment Variables Loader using the default path lexer for "_" separated paths.
-
EnvironmentVarsLoader
public EnvironmentVarsLoader(SentenceLexer lexer, ConfigParser parser)
Constructor for Environment Variables Loader.- Parameters:
lexer- how to create the tokens for the variables.parser- parser for Environment Variables
-
-
Method Detail
-
name
public java.lang.String name()
Description copied from interface:ConfigLoaderName of the config loader.- Specified by:
namein interfaceConfigLoader- Returns:
- name
-
accepts
public boolean accepts(java.lang.String format)
Description copied from interface:ConfigLoaderTrue if the config loader accepts the format.- Specified by:
acceptsin interfaceConfigLoader- Parameters:
format- config format.- Returns:
- True if the config loader accepts the format.
-
loadSource
public GResultOf<java.util.List<ConfigNodeContainer>> loadSource(ConfigSource source) throws GestaltException
Description copied from interface:ConfigLoaderLoad a ConfigSource then build the validated config node.- Specified by:
loadSourcein interfaceConfigLoader- Parameters:
source- source we want to load with this config loader.- Returns:
- the validated config node.
- Throws:
GestaltException- any exceptions
-
-