Class StandardConstructor.ConstructEnv

    • Constructor Detail

      • ConstructEnv

        public ConstructEnv()
    • Method Detail

      • construct

        public Object construct​(Node node)
        Description copied from interface: ConstructNode
        Construct a Java instance with all the properties injected when it is possible.
        Specified by:
        construct in interface ConstructNode
        Parameters:
        node - composed Node
        Returns:
        a complete Java instance or empty collection instance if it is recursive
      • apply

        public String apply​(String name,
                            String separator,
                            String value,
                            String environment)
        Implement the logic for missing and unset variables
        Parameters:
        name - - variable name in the template
        separator - - separator in the template, can be :-, -, :?, ?
        value - - default value or the error in the template
        environment - - the value from environment for the provided variable
        Returns:
        the value to apply in the template
      • getEnv

        public String getEnv​(String key)
        Get value of the environment variable
        Parameters:
        key - - the name of the variable
        Returns:
        value or null if not set