public class EnvScalarConstructor extends Constructor
Constructor.ConstructMapping, Constructor.ConstructScalar, Constructor.ConstructSequence, Constructor.ConstructYamlObjectSafeConstructor.ConstructUndefined, SafeConstructor.ConstructYamlBinary, SafeConstructor.ConstructYamlBool, SafeConstructor.ConstructYamlFloat, SafeConstructor.ConstructYamlInt, SafeConstructor.ConstructYamlMap, SafeConstructor.ConstructYamlNull, SafeConstructor.ConstructYamlOmap, SafeConstructor.ConstructYamlPairs, SafeConstructor.ConstructYamlSeq, SafeConstructor.ConstructYamlSet, SafeConstructor.ConstructYamlStr, SafeConstructor.ConstructYamlTimestamp| Modifier and Type | Field and Description |
|---|---|
static Pattern |
ENV_FORMAT |
static Tag |
ENV_TAG |
undefinedConstructorcomposer, loadingConfig, rootTag, typeDefinitions, typeTags, yamlClassConstructors, yamlConstructors, yamlMultiConstructors| Constructor and Description |
|---|
EnvScalarConstructor() |
| Modifier and Type | Method and Description |
|---|---|
String |
apply(String name,
String separator,
String value,
String environment)
Implement the logic for missing and unset variables
|
String |
getEnv(String key)
Get value of the environment variable
|
getClassForName, getClassForNodeconstructMapping2ndStep, constructSet2ndStep, createLongOrBigInteger, flattenMapping, processDuplicateKeysaddTypeDescription, checkData, constructArray, constructArrayStep2, constructDocument, constructMapping, constructObject, constructObjectNoCheck, constructScalar, constructSequence, constructSequenceStep2, constructSet, constructSet, createArray, createDefaultList, createDefaultMap, createDefaultSet, finalizeConstruction, getConstructor, getData, getPropertyUtils, getSingleData, isAllowDuplicateKeys, isEnumCaseSensitive, isExplicitPropertyUtils, isWrappedToRootException, newInstance, newInstance, newInstance, newList, newMap, newSet, postponeMapFilling, postponeSetFilling, setAllowDuplicateKeys, setComposer, setEnumCaseSensitive, setPropertyUtils, setWrappedToRootExceptionpublic static final Tag ENV_TAG
public static final Pattern ENV_FORMAT
public String apply(String name, String separator, String value, String environment)
name - - variable name in the templateseparator - - separator in the template, can be :-, -, :?, ?value - - default value or the error in the templateenvironment - - the value from environment for the provided variableCopyright © 2008–2021. All rights reserved.