Class StandardConstructor.ConstructEnv
java.lang.Object
org.snakeyaml.engine.v2.constructor.ConstructScalar
org.snakeyaml.engine.v2.constructor.StandardConstructor.ConstructEnv
- All Implemented Interfaces:
ConstructNode
- Enclosing class:
StandardConstructor
Construct scalar for format ${VARIABLE} replacing the template with the value from environment.
- See Also:
-
Field Summary
Fields inherited from class ConstructScalar
BOOL_VALUES -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionImplement the logic for missing and unset variablesConstruct a Java instance with all the properties injected when it is possible.Get value of the environment variableMethods inherited from class ConstructScalar
constructScalarMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ConstructNode
constructRecursive
-
Constructor Details
-
ConstructEnv
public ConstructEnv()
-
-
Method Details
-
construct
Description copied from interface:ConstructNodeConstruct a Java instance with all the properties injected when it is possible.- Parameters:
node- composed Node- Returns:
- a complete Java instance or empty collection instance if it is recursive
-
apply
Implement the logic for missing and unset variables- Parameters:
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 variable- Returns:
- the value to apply in the template
-
getEnv
-