本文整理了Java中org.apache.tools.ant.Project.createDataType()
方法的一些代码示例,展示了Project.createDataType()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Project.createDataType()
方法的具体详情如下:
包路径:org.apache.tools.ant.Project
类名称:Project
方法名:createDataType
[英]Create a new instance of a data type.
[中]创建数据类型的新实例。
代码示例来源:origin: org.apache.ant/ant
/**
* Initialisation routine called after handler creation
* with the element name and attributes. This configures
* the element with its attributes and sets it up with
* its parent container (if any). Nested elements are then
* added later as the parser encounters them.
*
* @param propType Name of the element which caused this handler
* to be created. Must not be <code>null</code>.
*
* @param attrs Attributes of the element which caused this
* handler to be created. Must not be <code>null</code>.
*
* @exception SAXParseException in case of error, such as a
* BuildException being thrown during configuration.
*/
public void init(String propType, AttributeList attrs) throws SAXParseException {
try {
element = helperImpl.project.createDataType(propType);
if (element == null) {
throw new BuildException("Unknown data type " + propType);
}
wrapper = new RuntimeConfigurable(element, propType);
wrapper.setAttributes(attrs);
target.addDataType(wrapper);
} catch (BuildException exc) {
throw new SAXParseException(exc.getMessage(), helperImpl.locator, exc);
}
}
代码示例来源:origin: org.apache.ant/ant
instance = getProject().createTask(definition.type);
if (instance == null) {
instance = getProject().createDataType(definition.type);
代码示例来源:origin: org.apache.ws.jaxme/jaxmejs
/** Creates a new, nested element with a {@link FileSet} of
* server side classes, for which client stubs are being
* generated.
*/
public FileSet createServerClasses() {
FileSet fs = (FileSet) getProject().createDataType("fileset");
serverClasses.add(fs);
return fs;
}
内容来源于网络,如有侵权,请联系作者删除!