本文整理了Java中org.apache.tools.ant.Project.setDescription()
方法的一些代码示例,展示了Project.setDescription()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Project.setDescription()
方法的具体详情如下:
包路径:org.apache.tools.ant.Project
类名称:Project
方法名:setDescription
[英]Set the project description.
[中]设置项目描述。
代码示例来源:origin: org.apache.ant/ant
/**
* Adds the text as description to the project.
*
* @param buf A character array of the text within the element.
* Will not be <code>null</code>.
* @param start The start element in the array.
* @param count The number of characters to read from the array.
*/
public void characters(char[] buf, int start, int count) {
String text = new String(buf, start, count);
String currentDescription = helperImpl.project.getDescription();
if (currentDescription == null) {
helperImpl.project.setDescription(text);
} else {
helperImpl.project.setDescription(currentDescription + text);
}
}
代码示例来源:origin: org.apache.ant/ant
/**
* Adds descriptive text to the project.
*
* @param text the descriptive text
*/
public void addText(String text) {
ProjectHelper ph = getProject().getReference(ProjectHelper.PROJECTHELPER_REFERENCE);
if (!(ph instanceof ProjectHelperImpl)) {
// New behavior for delayed task creation. Description
// will be evaluated in Project.getDescription()
return;
}
String currentDescription = getProject().getDescription();
if (currentDescription == null) {
getProject().setDescription(text);
} else {
getProject().setDescription(currentDescription + text);
}
}
代码示例来源:origin: stackoverflow.com
Project proj = this.projService.findProjectById(p.getId());
proj.setName(p.getName());
proj.setDescription(p.getDescription());
内容来源于网络,如有侵权,请联系作者删除!