Class EnvUtil


  • public final class EnvUtil
    extends Object
    EnvUtil
    • Method Detail

      • evaluate

        public static String evaluate​(String strSource)
        Evaluate a string that may contain a reference to an environement variable enclosed by ${...}
        Parameters:
        strSource - The source string
        Returns:
        The source string or the env variable's value if found.
      • evaluate

        public static String evaluate​(String strSource,
                                      String strEnvPrefix)
        Evaluate a string that may contain a reference to an environement variable enclosed by ${...}. If the environement variable has a suffix _FILE the evaluation will take the content of the file as value.
        Parameters:
        strSource - The source string
        strEnvPrefix - A prefix of the environment
        Returns:
        The source string or the env variable's value if found.