本文整理了Java中org.apache.tools.ant.Project.addDataTypeDefinition()
方法的一些代码示例,展示了Project.addDataTypeDefinition()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Project.addDataTypeDefinition()
方法的具体详情如下:
包路径:org.apache.tools.ant.Project
类名称:Project
方法名:addDataTypeDefinition
[英]Add a new datatype definition. Attempting to override an existing definition with an equivalent one (i.e. with the same classname) results in a verbose log message. Attempting to override an existing definition with a different one results in a warning log message, but the definition is changed.
[中]添加新的数据类型定义。试图用等效的定义(即使用相同的类名)覆盖现有定义会导致详细的日志消息。试图用不同的定义覆盖现有定义会导致警告日志消息,但定义已更改。
代码示例来源:origin: apache/groovy
public AntBuilder(final Project project, final Target owningTarget) {
this.project = project;
/*
* GROOVY-4524: The following is not needed anymore as an ant Project already by default has inputhandler
* set to DefaultInputHandler. And if it is again set here, it mistakenly overrides the custom input handler
* if set using -inputhandler switch.
*/
//this.project.setInputHandler(new DefaultInputHandler());
collectorTarget = owningTarget;
antXmlContext = new AntXMLContext(project);
collectorTarget.setProject(project);
antXmlContext.setCurrentTarget(collectorTarget);
antXmlContext.setLocator(new AntBuilderLocator());
antXmlContext.setCurrentTargets(new HashMap<String, Target>());
implicitTarget = new Target();
implicitTarget.setProject(project);
implicitTarget.setName("");
antXmlContext.setImplicitTarget(implicitTarget);
// FileScanner is a Groovy utility
project.addDataTypeDefinition("fileScanner", FileScanner.class);
}
代码示例来源:origin: org.gradle/gradle-core
public BasicAntBuilder() {
// These are used to discard references to tasks so they can be garbage collected
Field collectorField;
try {
nodeField = AntBuilder.class.getDeclaredField("lastCompletedNode");
nodeField.setAccessible(true);
collectorField = AntBuilder.class.getDeclaredField("collectorTarget");
collectorField.setAccessible(true);
Target target = (Target) collectorField.get(this);
Field childrenField = Target.class.getDeclaredField("children");
childrenField.setAccessible(true);
children = (List) childrenField.get(target);
} catch (Exception e) {
throw new RuntimeException(e);
}
getAntProject().addDataTypeDefinition("gradleFileResource", AntFileResource.class);
getAntProject().addDataTypeDefinition("gradleBaseDirSelector", BaseDirSelector.class);
}
代码示例来源:origin: com.thinkaurelius.groovy-shaded-asm/groovy-shaded-asm
public AntBuilder(final Project project, final Target owningTarget) {
this.project = project;
/*
* GROOVY-4524: The following is not needed anymore as an ant Project already by default has inputhandler
* set to DefaultInputHandler. And if it is again set here, it mistakenly overrides the custom input handler
* if set using -inputhandler switch.
*/
//this.project.setInputHandler(new DefaultInputHandler());
collectorTarget = owningTarget;
antXmlContext = new AntXMLContext(project);
collectorTarget.setProject(project);
antXmlContext.setCurrentTarget(collectorTarget);
antXmlContext.setLocator(new AntBuilderLocator());
antXmlContext.setCurrentTargets(new HashMap());
implicitTarget = new Target();
implicitTarget.setProject(project);
implicitTarget.setName("");
antXmlContext.setImplicitTarget(implicitTarget);
// FileScanner is a Groovy hack (utility?)
project.addDataTypeDefinition("fileScanner", FileScanner.class);
}
代码示例来源:origin: org.kohsuke.droovy/groovy
public AntBuilder(final Project project, final Target owningTarget) {
this.project = project;
this.project.setInputHandler(new DefaultInputHandler());
collectorTarget = owningTarget;
antXmlContext = new AntXMLContext(project);
collectorTarget.setProject(project);
antXmlContext.setCurrentTarget(collectorTarget);
antXmlContext.setLocator(new AntBuilderLocator());
antXmlContext.setCurrentTargets(new HashMap());
implicitTarget = new Target();
implicitTarget.setProject(project);
implicitTarget.setName("");
antXmlContext.setImplicitTarget(implicitTarget);
// FileScanner is a Groovy hack (utility?)
project.addDataTypeDefinition("fileScanner", FileScanner.class);
}
代码示例来源:origin: org.codehaus.groovy/groovy-ant
public AntBuilder(final Project project, final Target owningTarget) {
this.project = project;
/*
* GROOVY-4524: The following is not needed anymore as an ant Project already by default has inputhandler
* set to DefaultInputHandler. And if it is again set here, it mistakenly overrides the custom input handler
* if set using -inputhandler switch.
*/
//this.project.setInputHandler(new DefaultInputHandler());
collectorTarget = owningTarget;
antXmlContext = new AntXMLContext(project);
collectorTarget.setProject(project);
antXmlContext.setCurrentTarget(collectorTarget);
antXmlContext.setLocator(new AntBuilderLocator());
antXmlContext.setCurrentTargets(new HashMap<String, Target>());
implicitTarget = new Target();
implicitTarget.setProject(project);
implicitTarget.setName("");
antXmlContext.setImplicitTarget(implicitTarget);
// FileScanner is a Groovy utility
project.addDataTypeDefinition("fileScanner", FileScanner.class);
}
代码示例来源:origin: org.codehaus.groovy/groovy-all-minimal
public AntBuilder(final Project project, final Target owningTarget) {
this.project = project;
this.project.setInputHandler(new DefaultInputHandler());
collectorTarget = owningTarget;
antXmlContext = new AntXMLContext(project);
collectorTarget.setProject(project);
antXmlContext.setCurrentTarget(collectorTarget);
antXmlContext.setLocator(new AntBuilderLocator());
antXmlContext.setCurrentTargets(new HashMap());
implicitTarget = new Target();
implicitTarget.setProject(project);
implicitTarget.setName("");
antXmlContext.setImplicitTarget(implicitTarget);
// FileScanner is a Groovy hack (utility?)
project.addDataTypeDefinition("fileScanner", FileScanner.class);
}
代码示例来源:origin: org.codehaus.groovy/groovy-jdk14
public AntBuilder(final Project project, final Target owningTarget) {
this.project = project;
this.project.setInputHandler(new DefaultInputHandler());
collectorTarget = owningTarget;
antXmlContext = new AntXMLContext(project);
collectorTarget.setProject(project);
antXmlContext.setCurrentTarget(collectorTarget);
antXmlContext.setLocator(new AntBuilderLocator());
antXmlContext.setCurrentTargets(new HashMap());
implicitTarget = new Target();
implicitTarget.setProject(project);
implicitTarget.setName("");
antXmlContext.setImplicitTarget(implicitTarget);
// FileScanner is a Groovy hack (utility?)
project.addDataTypeDefinition("fileScanner", FileScanner.class);
}
内容来源于网络,如有侵权,请联系作者删除!