本文整理了Java中org.apache.tools.ant.Project.getUserProperties()
方法的一些代码示例,展示了Project.getUserProperties()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Project.getUserProperties()
方法的具体详情如下:
包路径:org.apache.tools.ant.Project
类名称:Project
方法名:getUserProperties
[英]Return a copy of the user property hashtable.
[中]返回用户属性哈希表的副本。
代码示例来源:origin: org.apache.ant/ant
break;
case BuiltinPropertySetName.COMMANDLINE:
names.addAll(getProject().getUserProperties().keySet());
break;
default:
代码示例来源:origin: org.testng/testng
private void delegateCommandSystemProperties() {
// Iterate over command-line args and pass them through as sysproperty
// exclude any built-in properties that start with "ant."
for (Object propKey : getProject().getUserProperties().keySet()) {
String propName = (String) propKey;
String propVal = getProject().getUserProperty(propName);
if (propName.startsWith("ant.")) {
log("Excluding ant property: " + propName + ": " + propVal, Project.MSG_DEBUG);
} else {
log("Including user property: " + propName + ": " + propVal, Project.MSG_DEBUG);
Environment.Variable var = new Environment.Variable();
var.setKey(propName);
var.setValue(propVal);
addSysproperty(var);
}
}
}
代码示例来源:origin: org.freemarker/freemarker
userPropertiesTemplate = wrapMap(project.getUserProperties());
代码示例来源:origin: cbeust/testng
private void delegateCommandSystemProperties() {
// Iterate over command-line args and pass them through as sysproperty
// exclude any built-in properties that start with "ant."
for (Object propKey : getProject().getUserProperties().keySet()) {
String propName = (String) propKey;
String propVal = getProject().getUserProperty(propName);
if (propName.startsWith("ant.")) {
log("Excluding ant property: " + propName + ": " + propVal, Project.MSG_DEBUG);
} else {
log("Including user property: " + propName + ": " + propVal, Project.MSG_DEBUG);
Environment.Variable var = new Environment.Variable();
var.setKey(propName);
var.setValue(propVal);
addSysproperty(var);
}
}
}
代码示例来源:origin: org.apache.ant/ant
/**
* Bind the runner to a project component.
* Properties, targets and references are all added as beans;
* project is bound to project, and self to the component.
* @param component to become <code>self</code>
*/
public void bindToComponent(ProjectComponent component) {
project = component.getProject();
addBeans(project.getProperties());
addBeans(project.getUserProperties());
addBeans(project.getCopyOfTargets());
addBeans(project.getCopyOfReferences());
addBean("project", project);
addBean("self", component);
}
代码示例来源:origin: org.apache.ant/ant
addAlmostAll(getProject().getUserProperties(), PropertyType.USER);
} else {
getProject().copyUserProperties(newProject);
代码示例来源:origin: org.apache.maven/maven-ant-tasks
/**
* Convert the Hashtable of Ant project properties to a Properties object
*
* @return The Ant project properties
*/
public Properties getAntProjectProperties()
{
Properties properties = new Properties();
Hashtable propsTable = null;
if ( this.isInheritAllProperties() )
{
propsTable = getProject().getProperties();
}
else
{
propsTable = getProject().getUserProperties();
}
Iterator propsIter = propsTable.keySet().iterator();
while ( propsIter.hasNext() )
{
String key = (String) propsIter.next();
String value = (String) propsTable.get( key );
properties.setProperty( key, value );
}
return properties;
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.freemarker
userPropertiesTemplate = wrapMap(project.getUserProperties());
代码示例来源:origin: org.freemarker/freemarker-gae
userPropertiesTemplate = wrapMap(project.getUserProperties());
代码示例来源:origin: org.freemarker/com.springsource.freemarker
userPropertiesTemplate = wrapMap(project.getUserProperties());
内容来源于网络,如有侵权,请联系作者删除!