@Test public void defaultValueReferencingAVariable() { context.putProperty("v1", "k1"); String result = OptionHelper.substVars("${undef:-${v1}}", context); assertEquals("k1", result); }
public static String substVars(String val, PropertyContainer pc1) { return substVars(val, pc1, null); }
OptionHelper { public static String substVars(String val, PropertyContainer pc1) { return substVars(val, pc1, null); } }
OptionHelper { public static String substVars(String val, PropertyContainer pc1) { return substVars(val, pc1, null); }  }
OptionHelper { public static String substVars(String val, PropertyContainer pc1) { return substVars(val, pc1, null); }  static Object instantiateByClassName(String className, Class<?> superClass, Context context); static Object instantiateByClassNameAndParameter(String className, Class<?> superClass, Context context, Class<?> type, Object param); static Object instantiateByClassName(String className, Class<?> superClass, ClassLoader classLoader); static Object instantiateByClassNameAndParameter(String className, Class<?> superClass, ClassLoader classLoader, Class<?> type, Object parameter); static String substVars(String val, PropertyContainer pc1); static String substVars(String input, PropertyContainer pc0, PropertyContainer pc1); static String propertyLookup(String key, PropertyContainer pc1, PropertyContainer pc2); static String getSystemProperty(String key, String def); static String getEnv(String key); static String getSystemProperty(String key); static void setSystemProperties(ContextAware contextAware, Properties props); static void setSystemProperty(ContextAware contextAware, String key, String value); static Properties getSystemProperties(); static String[] extractDefaultReplacement(String key); static boolean toBoolean(String value, boolean dEfault); static boolean isNullOrEmpty(@Nullable String str); }
OptionHelper { public static String substVars(String val, PropertyContainer pc1) { return substVars(val, pc1, null); }  static Object instantiateByClassName(String className, Class<?> superClass, Context context); static Object instantiateByClassNameAndParameter(String className, Class<?> superClass, Context context, Class<?> type, Object param); static Object instantiateByClassName(String className, Class<?> superClass, ClassLoader classLoader); static Object instantiateByClassNameAndParameter(String className, Class<?> superClass, ClassLoader classLoader, Class<?> type, Object parameter); static String substVars(String val, PropertyContainer pc1); static String substVars(String input, PropertyContainer pc0, PropertyContainer pc1); static String propertyLookup(String key, PropertyContainer pc1, PropertyContainer pc2); static String getSystemProperty(String key, String def); static String getEnv(String key); static String getSystemProperty(String key); static void setSystemProperties(ContextAware contextAware, Properties props); static void setSystemProperty(ContextAware contextAware, String key, String value); static Properties getSystemProperties(); static String[] extractDefaultReplacement(String key); static boolean toBoolean(String value, boolean dEfault); static boolean isNullOrEmpty(@Nullable String str);  }