Class PropertiesValueResolver

java.lang.Object
org.jboss.as.test.shared.PropertiesValueResolver

public class PropertiesValueResolver extends Object
Parses a string and replaces any references to system properties or environment variables in the string
Author:
Jaikiran Pai (copied from JBoss DMR project), David M. Lloyd
  • Constructor Details

    • PropertiesValueResolver

      public PropertiesValueResolver()
  • Method Details

    • replaceProperties

      public static String replaceProperties(String value)
      Replace properties of the form: ${<[env.]name>[,<[env.]name2>[,<[env.]name3>...]][:<default>]}
      Parameters:
      value - - either a system property or environment variable reference
      Returns:
      the value of the system property or environment variable referenced if it exists
    • replaceProperties

      public static String replaceProperties(String value, Properties properties)
      Replace properties of the form: ${<[env.]name>[,<[env.]name2>[,<[env.]name3>...]][:<default>]}
      Parameters:
      value - - either a system property or environment variable reference
      Returns:
      the value of the system property or environment variable referenced if it exists