本文整理了Java中org.apache.felix.framework.util.Util.substVars()
方法的一些代码示例,展示了Util.substVars()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Util.substVars()
方法的具体详情如下:
包路径:org.apache.felix.framework.util.Util
类名称:Util
方法名:substVars
[英]This method performs property variable substitution on the specified value. If the specified value contains the syntax ${<prop-name>}, where <prop-name> refers to either a configuration property or a system property, then the corresponding property value is substituted for the variable placeholder. Multiple variable placeholders may exist in the specified value as well as nested variable placeholders, which are substituted from inner most to outer most. Configuration properties override system properties.
[中]此方法对指定的值执行属性变量替换。如果指定的值包含语法${<prop name>},其中<prop name>引用配置属性或系统属性,则相应的属性值将替换变量占位符。指定的值中可能存在多个变量占位符以及嵌套的变量占位符,这些占位符从最内侧到最外侧被替换。配置属性覆盖系统属性。
代码示例来源:origin: spring-projects/spring-roo
Util.substVars(props.getProperty(name), name, null, null));
代码示例来源:origin: spring-projects/spring-roo
Util.substVars(props.getProperty(name), name, null, props));
代码示例来源:origin: apache/felix
public static String getPropertyWithSubs(Properties props, String name)
{
// Perform variable substitution for property.
String value = props.getProperty(name);
value = (value != null)
? Util.substVars(value, name, null, props): null;
return value;
}
代码示例来源:origin: apache/felix
public static Map<String, String> getPropertiesWithPrefix(Properties props, String prefix)
{
Map<String, String> result = new HashMap<String, String>();
Set<String> propertySet = props.stringPropertyNames();
for(String currentPropertyKey: propertySet)
{
if(currentPropertyKey.startsWith(prefix))
{
String value = props.getProperty(currentPropertyKey);
// Perform variable substitution for property.
value = (value != null)
? Util.substVars(value, currentPropertyKey, null, props): null;
result.put(currentPropertyKey, value);
}
}
return result;
}
代码示例来源:origin: org.drombler.acp/drombler-acp-startup-main
@Override
protected void resolveProperties(Properties configProps) throws IllegalArgumentException {
super.resolveProperties(configProps);
for (String propertyName : configProps.stringPropertyNames()) {
configProps.setProperty(propertyName,
Util.substVars(configProps.getProperty(propertyName), propertyName, null, configProps));
}
}
代码示例来源:origin: org.apache.servicemix.kernel/org.apache.servicemix.kernel.main
Util.substVars(props.getProperty(name), name, null, props));
代码示例来源:origin: org.ancoron.osgi.test/test-support-felix
props.setProperty(name, Util.substVars(props.getProperty(name), name, null, props));
代码示例来源:origin: org.apache.felix/org.apache.felix.main
Util.substVars(props.getProperty(name), name, null, null));
代码示例来源:origin: apache/felix
Util.substVars(props.getProperty(name), name, null, null));
代码示例来源:origin: nroduit/Weasis
for (Enumeration<?> e = props.propertyNames(); e.hasMoreElements();) {
String name = (String) e.nextElement();
map.put(name, Util.substVars(props.getProperty(name), name, null, props));
代码示例来源:origin: org.apache.felix/org.apache.felix.main
Util.substVars(props.getProperty(name), name, null, props));
代码示例来源:origin: apache/felix
val = substVars(val, currentKey, cycleMap, configProps);
代码示例来源:origin: org.apache.servicemix.kernel/org.apache.servicemix.kernel.main
val = substVars(val, currentKey, cycleMap, configProps);
代码示例来源:origin: apache/felix
Util.substVars(props.getProperty(name), name, null, props));
代码示例来源:origin: org.springframework.roo/org.springframework.roo.bootstrap
Util.substVars(props.getProperty(name), name, null, null));
代码示例来源:origin: org.springframework.roo/org.springframework.roo.bootstrap
Util.substVars(props.getProperty(name), name, null, props));
代码示例来源:origin: nroduit/Weasis
vmarg[1] = vmarg[1].substring(1, vmarg[1].length() - 1);
System.setProperty(vmarg[0], Util.substVars(vmarg[1], vmarg[0], null, null));
代码示例来源:origin: apache/felix
command = Util.substVars(command, "command", null, props);
Process p = BundleCache.getSecureAction().exec(command);
代码示例来源:origin: apache/felix
command = Util.substVars(command, "command", null, props);
Process p = BundleCache.getSecureAction().exec(command);
p.waitFor();
内容来源于网络,如有侵权,请联系作者删除!