Interface AvailableVariables

  • Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    @FunctionalInterface
    public interface AvailableVariables
    A functional interface for obtaining the value of variables given their names.
    Author:
    Randall Hauch
    • Method Detail

      • systemVariables

        static AvailableVariables systemVariables​(Configuration config)
        Get an AvailableVariables that returns System properties set with -Dvariable=value.

        This method does not use the configuration.

        Parameters:
        config - the configuration
        Returns:
        the available variables function that returns System properties; never null
      • environmentVariables

        static AvailableVariables environmentVariables​(Configuration config)
        Get an AvailableVariables that returns System environment variables set with operating system environment variables (e.g., ${JAVA_HOME}).

        This method does not use the configuration.

        Parameters:
        config - the configuration
        Returns:
        the available variables function that returns System properties; never null
      • variableForName

        String variableForName​(String varName)
        Obtain the value of a variable with the given name.
        Parameters:
        varName - the variable name; may be null
        Returns:
        the value of the variable; may be null if the named variable is not known