public class EnvScalarConstructor extends Constructor
Constructor.ConstructMapping, Constructor.ConstructScalar, Constructor.ConstructSequence, Constructor.ConstructYamlObject
SafeConstructor.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 |
undefinedConstructor
composer, 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, getClassForNode
constructMapping2ndStep, constructSet2ndStep, createLongOrBigInteger, flattenMapping, processDuplicateKeys
addTypeDescription, checkData, constructArray, constructArrayStep2, constructDocument, constructMapping, constructObject, constructObjectNoCheck, constructScalar, constructSequence, constructSequenceStep2, constructSet, constructSet, createArray, createDefaultList, createDefaultMap, createDefaultSet, finalizeConstruction, getConstructor, getData, getPropertyUtils, getSingleData, isAllowDuplicateKeys, isExplicitPropertyUtils, isWrappedToRootException, newInstance, newInstance, newInstance, newList, newMap, newSet, postponeMapFilling, postponeSetFilling, setAllowDuplicateKeys, setComposer, setPropertyUtils, setWrappedToRootException
public 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–2020. All rights reserved.